[CMI.PM] String matching sanity check?
Mitch Kutzko
mitch at ncsa.uiuc.edu
Wed May 25 14:32:43 PDT 2005
Doh. vi's "ed" bites me once again. :-)
After un-escaping the parens, it works wonderfully!
Thanks,
Mitch
At 04:18 PM 5/25/2005 -0500, you wrote:
> Take out the backslashes before the parentheses -- it's not necessary as
> the parentheses are already special grouping characters.
>
> Cheers,
> Arun
>
> On Wed, 25 May 2005 4:15 pm, Mitch Kutzko wrote:
> > Hi, folks -- I'm trying to do some substitutions on some email archive
> > files, and convert the "@" in any email addresses found in the Subject:
> > line to " --at-- ".
> >
> > I'm trying this just to test with right now:
> >
> > #!/usr/bin/perl -pi.old
> > s/Subject: \(.*\)@\(.*\)/Subject: \1 --at-- \2/g;
> >
> > But this steadfastly refuses to match anything. Here's a typical line
> > it
> > would encounter:
> >
> > Subject: DAST: Iperf - Iperf win32 Binaries - mervyn.yeo at gmail.com
> >
> > Doesn't matter if I escape the "@". This also doesn't match:
> >
> > s/Subject: \(.*\)\@\(.*\)/Subject: \1 --at-- \2/g;
> >
> >
> > This has to be some simple thing I'm forgetting, but right now it's
> > completely eluding me. Any ideas?
> >
> > Thanks,
> >
> > Mitch
> > --
> > Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu |
> > 217-333-1199
> > Project: http://dast.nlanr.net/ | Personal:
> > http://hobbes.ncsa.uiuc.edu/
> > _______________________________________________
> > Champaign-Urbana mailing list
> > Champaign-Urbana at pm.org
> > http://mail.pm.org/mailman/listinfo/champaign-urbana
>
>
--
Mitch Kutzko | mitch at dast.nlanr.net | mitch at ncsa.uiuc.edu | 217-333-1199
Project: http://dast.nlanr.net/ | Personal: http://hobbes.ncsa.uiuc.edu/
More information about the Champaign-Urbana
mailing list