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=

Re: Matching Question

2009-06-01 Thread John W. Krahn
Farrell, Patrick wrote: Thanks. What if I added numbers like this $msgText =~ s!(?<= )([a-z,0-9]+)(?= )!$1!g; Did you really want to include a comma as part of that character class? But I didn't want a string of only numbers? In the strings I waned, I know the first character would not be

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

Re: Matching question

2002-04-03 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > > "Elizabeth A. Rice" wrote: > > > > > > > > What I've written so far > > > > > > > > @ARGV = ("$logfile");# prime the diamond > > > > oper

Re: Matching question

2002-04-03 Thread John W. Krahn
Jenda Krynicky wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > "Elizabeth A. Rice" wrote: > > > > > > What I've written so far > > > > > > @ARGV = ("$logfile");# prime the diamond operator > > ^^^^ > > Useless use of quotation marks and parenthesis.

Re: Matching question

2002-04-03 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > "Elizabeth A. Rice" wrote: > > > > What I've written so far > > > > @ARGV = ("$logfile");# prime the diamond operator > ^^^^ > Useless use of quotation marks and parenthesis. > > @ARGV = $logfile; I agree complet

Re: Matching question

2002-04-03 Thread John W. Krahn
"Elizabeth A. Rice" wrote: > > I am trying to find the first occurrance of a date string in several > different files in order to re-write all of today's entries back into the > existing log file after taking out all the old entries to be archived. (I > also realize lots of folks have done this

RE: matching question (real newbie...not like you fake newbies out th ere...)

2001-05-17 Thread King, Jason
Joel R Stout writes .. >I want to get the file names of all "EDI" files from a certain >directory. I >do not want "ENT" (or encrypted) file names. > >Example: > >The directory contains: >a001.edi >a002.edi >a003.edi.ent >a004.EDI > >After getting the file name in $_ I did the following match

Re: matching question (real newbie...not like you fake newbies out there...)

2001-05-17 Thread Shawn
/edi$/i I think? On 05/17, John Joseph Trammell rearranged the electrons to read: > On Thu, May 17, 2001 at 09:25:53PM -, Stout, Joel R wrote: > > if (/edi\b/i) { # thinking I would match file names 1, 2, and 4. Instead I > > matched on all. Wasn't \b supposed to help me out here? Or does

Re: matching question (real newbie...not like you fake newbies out there...)

2001-05-17 Thread John Joseph Trammell
On Thu, May 17, 2001 at 09:25:53PM -, Stout, Joel R wrote: > > I want to get the file names of all "EDI" files from a certain directory. I > do not want "ENT" (or encrypted) file names. > > Example: > > The directory contains: > a001.edi > a002.edi > a003.edi.ent > a004.EDI > > After ge