Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Re: Re: Removing data from a string with Regexby CharlesClarkson (Curate) |
on Nov 15, 2001 at 23:01 UTC ( [id://125642]=note: print w/replies, xml ) | Need Help?? |
That regex would allow --from @something.com to pass and assign ' ' to $name. It would likely be better to use:/^--from\s*([^@\s]+)/ which fails for --from @something.com and could simplify the code further.
HTH, Charles K. Clarkson
In Section
Seekers of Perl Wisdom
|
|