MESSAGE
DATE | 2003-07-17 |
FROM | joev_nylxs@pipeline.com
|
SUBJECT | Re: [hangout] Perl pattern matching
|
That was my next thought, but I thought there might be an easier way.
Joe
-------Original Message------- From: Steve Milo Sent: 07/17/03 10:53 AM To: hangout-at-nylxs.com Subject: [hangout] Perl pattern matching
> > You could do something like
if $pattern =~ (/(pattern to remove)\s(pattern to keep)/) { print $2, "\n";}
In other words you isolate the different patterns in parenthesis. You can use anything in those parenthises regexp or text. If the pattern matches you can then print the pattern you want as a scalar variable. Keep in mind you have to account for white spaces, etc if you are using pattern matching.
But to answer your question, you may not be matching the pattern exactly. The above might help you troubleshoot.
Steve
____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
> ____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|