|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re^3: Regex for e-mail contacts nameby flexvault (Vicar) |
| on Jan 23, 2012 at 20:45 UTC ( #949521=note: print w/ replies, xml ) | Need Help?? |
|
lothar4ever, You don't say where the data is coming from, so to get your $string to be what you want, you need to escape the '@' signs:
For this, I would use 'split': ( tested code, but re-typed from X-Terminal ):
Now you have an array that you could use a regex or 'split' again on each element of the array in get the format you want. If the data is coming from disk, it maybe that each email address is on a line terminated with a 'CR'. Hope this helps. "Well done is better than well said." - Benjamin Franklin
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||