Regex matching with exclusions
<p>I am working on creating a custom markup syntax and trying to match certain strings surround by special characters. For example <code>//Some text//</code> is matched fine with regex <code>\/\/</code>. </p>

<p>The expression <code>\/\/</code> works in most cases, except when there are urls in the text and throw everything off. How can I exclude/handle cases when there is <code>p:</code> or <code>s:</code> preceding the double slash, like in urls: </p>

<blockquote>
  <p>http:// or https://</p>
</blockquote>

<p>I was thinking to exclude <code>p://</code> and <code>s://</code> but not sure how.
Thanks in advance!</p>