RE: Matching Question

2009-06-02 Thread Farrell, Patrick
Saturday, May 30, 2009 3:49 AM To: Perl Beginners Subject: Re: Matching Question Farrell, Patrick wrote: > This is roughly what I am trying to do. Surround lower case strings within a > string with tags. > > === > $msgText=

Matching Question

2009-05-30 Thread Farrell, Patrick
This is roughly what I am trying to do. Surround lower case strings within a string with tags. === $msgText="THIS IS MY test STRING"; $msgText =~ m/ [a-z]+ /; #or $msgText =~ /\s[a-z]+\s/; if(defined($1)){ $1=~ s/\s+//g;

Regular Expression Question

2008-09-22 Thread Farrell, Patrick
I want to replace all instances of ~someString~ in a larger string with someString I tried the following statement: $string =~ s/\~.*\~/.*<\/i>/g; But what I get is a bunch of the following as the replacements: .* How do I retain the original .* in the replacement? Thanks -- To unsu