note
Anonymous Monk
If false positives weren't a problem, this would do:
<code>
@urls = $string =~ m!(?:\w+:/*)?(?:[\w\-]+\.)+\w+!g;
</code>
That would grab any number of words seperated by dots (without spaces), and would catch the protocol as well, if there is one.
427227
427227
2