Ok, time to geek out and test the theory that basically almost every liberty minded person also happens to be a programmer... so, someone here should be able to answer me...
Perl Compatible regular expressions...
I need to modify a regular expression that parses a URL out of a block of text.
It's currently two expressions
1st
replace .*<.*?href="
with (nothing)
2nd
replace ".*?>.*
with (nothing)
by (nothing) I mean that part is empty... the goal is to take the block of text and edit out everything that is not part of a URL, so that I am left with just the URL...
The problem is that when there are two URLs in the block of text, the whole thing explodes and doesn't work right at all...
Is there a way to modify the expressions to pluck out only the FIRST instance of a url? I am a complete n00b to regular expressions.