![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Removing data from a string with Regexby c (Hermit) |
on Nov 15, 2001 at 02:16 UTC ( #125442=note: print w/replies, xml ) | Need Help?? |
you may want to look at this to look over the basics of regular expressions. basically, i think you're wanting to match everything after the @. so you may want to look through perlre and look for what matches any single character and how to match it one or more times. the other option, you might want to take on this one is splitting the string based on the @ and grabbing the first instance within the split. something like $from = (split(/\@/, $from))[0]; humbly -c
In Section
Seekers of Perl Wisdom
|
|