Q:

Regex - Don't match a group if it starts with a string in javascript

I'm struggling with some regex, in javascript which doesn't have a typical lookbehind option, to only match a group if it's not preceded with a string:
(^|)(www\.[\S]+?(?=&#x20;|[,;:!?]|\.(&#x20;)|$))

so in the following 
hello&#x20;http&#x3a;&#x2f;www.mytestwebsite.com&#x20;is&#x20;awesome

I'm trying to detect if the www.mytestwebsite.com is preceeded by 
&#x2f;

and if it is I don't want to match, otherwise match away. I tried using a look ahead but it looked to be conflicting with the look ahead I already had.
I've been playing around with placing (?!&#x2f) in different areas with no success.
(^|)((?!&#x2f)www\.[\S]+?(?=&#x20;|[,;:!?]|\.(&#x20;)|$))

A look ahead to not match if the match is preceded

A:

Due to lack of lookbehinds in JS, the only way to accomplish your goal
is to match those web sites that contain the errant &#x2f; as well.  
This is because a lookahead won't advance the current position.
Only a match on consumable text will advance the position.  
But, a good workaround has always been to include the errant text as an option
within the regex. You'd put some capture groups around it, then test the
group for a match. If it matched, skip, go on to next match.   
This requires sitting in a while loop checking each successful match.
In the below regex, if group 1 matched, don't store the group 2 url,
If it didn't, store the group 2 url.  
(&#x2f;)?(www\.\S+?(?=&#x20;|[,;:!?]|\.(&#x20;)|$)) 
Formatted:  
 ( &\#x2f; )?                  # (1)
 (                             # (2 start)
      www\. \S+? 
      (?=
           &\#x20;
        |  [,;:!?] 
        |  \.
           ( &\#x20; )                   # (3)
        |  $ 
      )
 )                             # (2 end)

