title: How to make a regex for capturing one symbol only, but with restrictions?
body: <p>I need a regex for javascript that allows me to select a single character with a restriction: that it does NOT have a specified character besides itself.</p>
  
  <p>I need to select the character <code>/</code>
  but only if it does NOT have the character <code>a</code> besides it.</p>
  
  <p>E.g.:</p>
  
  <pre><code>str = "I Like this/ and a/ basketball is round a/a ups.Papa/ tol/d /me tha/t";
  
  myregex = ????
  var patt = new RegExp(myregex);
  var res = patt.split(str);
  </code></pre>
  
  <p>And the result should be something like this:</p>
  
  <pre><code>res[0] = "I Like this"
  res[1] = " and a/ basketball is round a/a ups.Papa/ tol"
  res[2] = "d "
  res[3] = "me tha/t"
  </code></pre>
  
  <p>The regex should be something like:
  <code>(if a then not)(\/)(if a then not)</code></p>
  
  <p>I have no idea how to do it, I tried: <code>[^a](\/)[^a]</code>, but then it selects also the characters that are beside the <code>/</code>, like <code>s/</code>, <code>l/d</code>, not the <code>a</code>'s; I don't want to select the characters beside the <code>/</code>.</p>