Regular expressions are a very powerful thing and a lot of junior developers struggle to wrap their heads around it and remember the syntax.
VerEx() .startOfLine() .then('http') .maybe('s') .then('://') .maybe('www.') .anythingBut(' ') .endOfLine();
The above code will compile into this RegExp:
P.S. Remember, never try to parse html with regular expressions!