([^("|'|>)])((http(s)?:\/\/|www\.)[A-Z0-9._%+\-\/]*)(?!["|'])
I am using the above on the following text:
this is the world truning at the ground level https://en.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange this is the world truning at the ground level
this is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground levelthis is the world truning at the ground level http://desktop.com
http://desktop.com http://desktop.com ahsdjhaldhjashdk
If I use this regex on the passage above, I get all the links but with a preceeding space. I need a REGEX that checks the condition that I have but select the preceeding space.
I have the preceding check of ([^("|'|>)])
as I need that if I the following text of:
<a href="http://desktop.com/" target="_blank" data-mce-href="http://desktop.com">http://desktop.com</a>
Then none of the URLS in this get selected.