This should be a simple regex but I can’t seem to figure it out.
Can someone please provide a 1-liner to take any string of arbitrary HTML input and populate an array with all the Facebook URLs (matching http://www.facebook.com) that were in the HTML code?
I don’t want to use any CPAN modules and would much prefer a simple regex 1-liner.
Thanks in advance for your help!
Obligatory link explaining why you shouldn’t parse HTML using a regular expression.
That being said, try this for a quick and dirty solution: