I am struggling with some regex, in javascript, which does not have the typical lookbehind option, to match only the group if it is not preceded by a line:
(^|)(www\.[\S]+?(?= |[,;:!?]|\.( )|$))
therefore in the next
hello http:/www.mytestwebsite.com is awesome
I am trying to determine if the site has surpassed www.mytestwebsite.com
&
and if itβs not me, then I donβt want to correspond, otherwise I coincide. I tried to use a look ahead, but it looked contradictory with what I already had in mind.
I played with placement (?! & # X2f) in different areas without success.
(^|)((?!/)www\.[\S]+?(?= |[,;:!?]|\.( )|$))
Look forward to not match if a match precedes
source share