[CMI.PM] String matching sanity check?

Mitch Kutzko mitch at ncsa.uiuc.edu
Wed May 25 14:14:47 PDT 2005


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/


More information about the Champaign-Urbana mailing list