MESSAGE
DATE | 2003-07-17 |
FROM | Ruben Safir Secretary NYLXS
|
SUBJECT | Re: [hangout] Perl pattern matching
|
Yes you can with the e switch on the regex
Ruben
On Thu, Jul 17, 2003 at 11:29:00AM -0400, joev_nylxs-at-pipeline.com wrote: > > 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
-- __________________________ Brooklyn Linux Solutions __________________________ DRM is THEFT - We are the STAKEHOLDERS http://fairuse.nylxs.com
http://www.mrbrklyn.com - Consulting http://www.inns.net <-- Happy Clients http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
1-718-382-0585 ____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|