Re: Regular Expressions with Incremented Variable Embedded

2009-05-30 Thread John W. Krahn
Raabe, Wesley wrote: I am using regular expressions to alter a text file. Where my original file has three spaces to start a paragraph, I want to replace each instance of three spaces with a bracketed paragraph number, with a counter for paragraph numbers, , , etc. The PERL program that I'm u

Re: Regular Expressions with Incremented Variable Embedded

2009-05-30 Thread Chas. Owens
On Sat, May 30, 2009 at 23:32, Raabe, Wesley wrote: > > I am using regular expressions to alter a text file. Where my original file > has three spaces to start a paragraph, I want to replace each instance of > three spaces with a bracketed paragraph number, with a counter for paragraph > number

Regular Expressions with Incremented Variable Embedded

2009-05-30 Thread Raabe, Wesley
I am using regular expressions to alter a text file. Where my original file has three spaces to start a paragraph, I want to replace each instance of three spaces with a bracketed paragraph number, with a counter for paragraph numbers, , , etc. The PERL program that I'm using is modeled on

Re: Matching Question

2009-05-30 Thread John W. Krahn
Farrell, Patrick wrote: 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)){ That

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;