[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Forum] Extracting email addresses from surrounding bracketts



Hello all,
	I am a novice Perler, using macperl to write a small runtime to
convert text lists of email addresses. My question is, what is the most
efficient regular expression I can use to remove say brackets or quotes from
string and preserve everything in between those brackets and quotes. For
example, I would like to turn something like:     {coolness@cool.com}
into:   coolness@cool.com  .   The data is jumbled and sometimes has email
address listed with brackets, quotes, or parens around each separated by
commas or spaces or colons. Also other data is bounded with the same parens,
bracketts, or quotes so I can't just do $line =~ s/\{.*\}//  because I only
want email addresses from the line and not the other stuff. I tried using
s/\{.*@.*\}/  but wasn't sure how to extract the email address from in
between the bracketts. Help?


Kris

Kris A. Miyasato, MA
Server Administrator
Pepperdine University - GSEP
kmiyasat@pepperdine.edu
(310)568-5722
(310)568-5755 fax

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-forum-request@macperl.org