Perl Regex HELP!

Brian Densmore DensmoreB at ctbsonline.com
Fri Jul 26 19:12:45 CDT 2002


Umm, not to be obvious, but you're running Linux. Take it from someone
else's code.
Like webmail. ;')

> -----Original Message-----
> From: Jason Baker [mailto:baker at cyborgworkshop.com]
> Sent: Saturday, July 27, 2002 1:10 AM
> To: kclug at kclug.org
> Subject: Perl Regex HELP!
> 
> 
> I am going nuts here!   Im trying to do, what I would think 
> would be, a
> simple regex on a string.  I have a string that looks like this
> 
> To: user at where.com, user2 at where.com
>     user3 at where.com
> Cc: user4.here.com
> 
> 
> What I want to do is pickup all of the email addys on the To: like,
> spanning both lines, and put them into a string. The only consistent
> string terminator is to match a line that begins with a 
> character and has
> a colon.  I can't get the regex to work to save my own life though.
> 
> m/(^To:.*)(^*+:/$)  is what I THINK it should be, doesnt work 
> though.  Can
> anyone help me out?
> 
> -- 
>                  Jason
>          www.cyborgworkshop.com
> ...and the geek shall inherit the earth...
> 
> 
> 
> majordomo at kclug.org
> 




More information about the Kclug mailing list