Hey guys. I've got a couple of questions,
I found this someplace while looking for ways to find email addresses in a file:
/(\S+\@\S+\.\S+)/
If I understand this correctly it finds any non-whitespace word (\S) then expects an "@" then matches any non-whitespace word, then a "." then any non-whitespace word.
so it would match me@place.com correct?
But not first.last@my.place.net,
so would this match the second one?
/(\S+\@\S+)/
now I know that it will match non-valid email addresses, however I will deal with that later..
The only other problem would be that it would match
[me@place.com] or <me@place.com>
so I would like to strip off certain characters.
should I use:
@myName = split([|]|<|>);
print "$myName[1]\n";
and have that print the email address between the characters?
Thanks so much for your help! I really Appreciate it!
-jake
I found this someplace while looking for ways to find email addresses in a file:
/(\S+\@\S+\.\S+)/
If I understand this correctly it finds any non-whitespace word (\S) then expects an "@" then matches any non-whitespace word, then a "." then any non-whitespace word.
so it would match me@place.com correct?
But not first.last@my.place.net,
so would this match the second one?
/(\S+\@\S+)/
now I know that it will match non-valid email addresses, however I will deal with that later..
The only other problem would be that it would match
[me@place.com] or <me@place.com>
so I would like to strip off certain characters.
should I use:
@myName = split([|]|<|>);
print "$myName[1]\n";
and have that print the email address between the characters?
Thanks so much for your help! I really Appreciate it!
-jake