[thelist] testing for email address in perl
Adrian Fischer
adrian at logo-logic.com
Sat Jan 12 23:12:42 CST 2002
Hi Gang,
I need to be able to test to see if an email address is in a string using
perl.
Any ideas on how I pattern match to one.
I am working on trying to fathom it but seem to be going round in circles.
This is what Im doing:
<snip>
open (FILE, ">>thisfile.txt") || die "cant open thisfile";
while (defined($stuff = <FILE>))
{
@stuff=split(//, $stuff);
foreach $stuff(
and this is as far as i can get.
REGEX STUFF GOES HERE.
I think I could spilt on white spaces character "\s" or is it a non white
space character "\S" as the address should have one at front and back. Good
so far?
but how do I say "find me the $stuff that has @ in it ??
Regards
Adrian Fischer
More information about the thelist
mailing list