CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Consecutive characters: Edit Log



Melvosh
User

Nov 26, 2001, 9:13 AM


Views: 21941
Consecutive characters

I'm parsing (or attempting to parse) a textarea form submission. I'd like to replace all line breaks with
(which is working), and I'd also like to insert a
after 30 consecutive non-space characters, if they exist. I was given a suggestion, but without explanation, so I wasn't sure how to implement it. This is what I've got, but it's definitely not right. Any help would be appreciated. Thanks.

$new_issue = $ilmscript->param('Issue');
$new_issue =~ s/"^[^ ]{30}$"/g;
$new_issue =~ s/\r?\n/g;


"Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read." - Grouch Marx

(This post was edited by Melvosh on Nov 26, 2001, 8:14 AM)


This post has not been edited


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives