in reply to Grepping out strings
If false positives weren't a problem, this would do:
That would grab any number of words seperated by dots (without spaces), and would catch the protocol as well, if there is one.@urls = $string =~ m!(?:\w+:/*)?(?:[\w\-]+\.)+\w+!g;
|
---|
In Section
Seekers of Perl Wisdom