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
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
[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
>
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
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
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
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
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
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.
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
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 ($
RTLDN)" To: 'Philip Morley'
<[EMAIL PROTECTED]>
Subject: RE: Patt
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
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
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
15 matches
Mail list logo