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=
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
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
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
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.
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
"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
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
/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
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
10 matches
Mail list logo