P is for Practical | |
PerlMonks |
Re: Re: Regex probleme, how memorize (match)? with question mark ?by tachyon (Chancellor) |
on Jul 07, 2001 at 00:07 UTC ( [id://94587]=note: print w/replies, xml ) | Need Help?? |
Nice regex but you don't need the trailing >. It adds nothing and will cause something that like mailto:foo@bar.com" > to fail. Either drop it or allow for 0 or more spaces with a \s* (/href="mailto:([^"]*)">/ # may fail (/href="mailto:([^"]*)"\s*>/ # allows legal spaces (/href="mailto:([^"]*)"/ # best option, just match # what we want cheers tachyon s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In Section
Seekers of Perl Wisdom
|
|