Re: Pattern matching question

2006-04-20 Thread Williamawalters
In a message dated 4/20/2006 5:55:08 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes:   > Craig Cardimon wrote:> > I'm looking for patterns where the sign "%" or the word "percent" are > > preceded by a group of one or more digits and zero or more spaces.> >> > if( $line =~ /\%|\bperce

Re: Pattern matching question

2006-04-20 Thread Todd Beverly
Craig Cardimon wrote: I'm looking for patterns where the sign "%" or the word "percent" are preceded by a group of one or more digits and zero or more spaces. if( $line =~ /\%|\bpercent\b/i ) { if( $line =~ /\d+\s*(\%|\bpercent\b/i ) { # magic happens } } Am I on the right

RE: Pattern matching question

2006-04-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > I'm looking for patterns where the sign "%" or the word "percent" are > preceded by a group of one or more digits and zero or more spaces. > > if( $line =~ /\%|\bpercent\b/i ) > { > if( $line =~ /\d+\s*(\%|\bpercent\b/i ) > { > # magic happens >

RE: pattern matching

2005-06-21 Thread eric clark
OTECTED], activeperl@listserv.ActiveState.com>Subject: RE: pattern matching>Date: Mon, 20 Jun 2005 18:08:25 -0400>MIME-Version: 1.0>Received: from kbwnycsrvowa1.KBW.COM ([208.252.30.99]) by mc5-f30.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 20 Jun 2005 15:08:28 -0700>Receiv

re: pattern matching

2005-06-21 Thread JPerlmutter
i found oreilly's learning perl to have an amazing pattern matching section. i always hated and dreaded them before that. now i love them in perl because i find them easy.. the questions that come to mind from : >Wonder if you pattern matching wizards out there can help me match the >patterns b

RE: pattern matching

2005-06-20 Thread Harwood, Andrew (DTEI)
Here's my suggestion that allows for either upper or lower case "re". It will also reject a line where there is NO number between the [ and ] [Rr][Ee]:?\s*\[(\d+)\] This does not allow for white space between the [ and the number (and also between the number and the ]), if you wanted that (the w

Re: pattern matching

2005-06-20 Thread Foo Ji-Haw
How about: re:?\s*[] Hawk wrote: Hi, Wonder if you pattern matching wizards out there can help me match the patterns below: re [] < white space between "e" and "[" re[] re: [] < white space after ":" and "[" Where are random numbers of

RE: pattern matching

2005-06-20 Thread Gardner, Sam
eric clark [mailto:[EMAIL PROTECTED] Sent: Monday, June 20, 2005 3:57 PMTo: [EMAIL PROTECTED]; activeperl@listserv.ActiveState.comSubject: RE: pattern matching off the top of my head ... /re.*\[\d+\]/i Eric "I'd take you seriously but to do so would be an affront to your

RE: pattern matching

2005-06-20 Thread eric clark
off the top of my head ... /re.*\[\d+\]/i Eric "I'd take you seriously but to do so would be an affront to your intelligence." -- William F. Buckley -- >From: "Hawk" <[EMAIL PROTECTED]>>Reply-To: [EMAIL PROTECTED]>To: >Subject: pattern matching>Date: Mon, 20 Jun 2005 14:29:46 -0400>MIME-Version: 1.

RE: pattern matching

2005-06-20 Thread Gardner, Sam
Title: RE: pattern matching /re:?\s*\[\d+\]/i; Seems to work Sam Gardner GTO Application Development Keefe, Bruyette & Woods, Inc. 212-887-6753 -Original Message- From: Hawk [mailto:[EMAIL PROTECTED]] Sent: Monday, June 20, 2005 2:30 PM To: active

RE: Pattern matching null strings

2002-04-29 Thread Joe Rioux
It's an interactive application so speed during a prompt for data is virtually a non-issue. And if the first one works why the desire for a different solution? What does the 2nd give you over the 1st? > print "Please enter the string: "; > $Response = ; > chomp $Response; > if ($

RE: Pattern matching null strings

2002-04-29 Thread Philip Morley
RTLDN)" To: 'Philip Morley' <[EMAIL PROTECTED]> Subject: RE: Patt

Re: Pattern Matching

2001-03-22 Thread Tim Scott
Here's a script I use to find large files with the same name for pruning purposes :- See the if in the wanted() sub. Here it just adds both names+paths to the output if it's seen the file of the same name previously. It should be relatively easy to adjust it to product a count ... if (exi

RE: Pattern Matching

2001-03-21 Thread william . meitzen
Title: RE: Pattern Matching Ruebel, If I understand your intent correctly, it's because the scope of your "if" statement is too large.  You need to collect ALL lines BEFORE enumerating and printing them out. I haven't run this code, but I think this

RE: Pattern Matching

2001-03-21 Thread william . meitzen
Title: RE: Pattern Matching #!/usr/bin/perl # - set up the list @items = (     "1Mb network card",     "10Mb network card",     "100Mb network card",     "1Mb network card",     "La