title: Is it possible to use only lookaround to match characters that are not repeated immediately before and after?
body: <p>For example, to match the first slash after the domain name in the URL.<br />
  Intent: Only match <code>'/'</code> in <code>'.com/...'</code> but not any <code>'/'</code> in <code>'https://'</code>.</p>
  <pre class="lang-js prettyprint-override"><code>url = 'https://example.com/...';
  [
  url.match(       /(?&lt;!\/)(?&lt;slash&gt;\/)(?!\k&lt;slash&gt;).../), // [A]
  url.match(/(?&lt;!\k&lt;slash&gt;)(?&lt;slash&gt;\/)(?!\k&lt;slash&gt;).../)  // [B]
  ]
  </code></pre>
  <p>The above [A] returns the correct match, but [B] is <em>the <strong>kind</strong> of expression</em> I want (although it did not match any characters), that is, to use the <code>/</code> character only <strong>1 time</strong> in the body of regex literals.</p>
  <p>Is there a <em><strong>generalized</strong> form of expression</em> similar to [B] (using capturing groups or the like) and using only regular expression <strong>literals</strong> (instead of using the constructor (<code>RegExp</code>))?</p>