Goal:
Create regex to capture ALL urls in a string.
The regex should find all URLS but end the match as soon as a whitespace OR a punctuation mark (?,.!'") followed by a whitespace character (i.e. \s in regex) is found.
Here's what I have:
([h|H][t|T][t|T][p|P][s|S]?:\/\/)([w]{0,3}[.]{0,1}[a-zA-Z0-9.-]+.[a-zA-Z0-9]{2,10}[\s])
It works for everything, the only problem is that it only ends when a white space it detected. I need it to end when a whitespace is detected OR a punctuation mark followed by a whitespace is detected.
Any help is greatly appreciated!