title: Regex for replacing markdown links with <a> ONLY if link does not contain http
body: <p>I'm working on a python application that tries to reuse markdown from github pages and I need to handle links a particular way.  I currently use the following to convert markdown links to what I need:</p>
  
  <pre><code>filterString = '([^\!]|^)\[(.+)\]\((.+)\)'
  filteredPage = re.sub(filterString, r"""&lt;a href='#' onclick='requestPage("\3");'&gt;\2&lt;/a&gt;""", pageContent)
  </code></pre>
  
  <p>This converts something like:</p>
  
  <pre><code>[Getting Started](gettingStarted.md)
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;a href='#' onclick='requestPage("gettingStarted.md");'&gt;Getting Started&lt;/a&gt;
  </code></pre>
  
  <p>This currently ignores links for images (preceded by a '!') which is as desired.  The problem is that some of the markdown contains external links that I do not want converted.</p>
  
  <p>I want to use the substitution on:</p>
  
  <pre><code>[Getting Started](gettingStarted.md)
  </code></pre>
  
  <p>but not either of these:</p>
  
  <pre><code>![Getting Started](gettingStarted.png)
  [Getting Started](https://www.gettingstarted.com)
  </code></pre>
  
  <p>I've seen examples of matching things that don't begin with something, but since I'm trying to match within a certain position (i.e, match when in parenthesis after something in brackets that doesn't start with an !) I'm not sure how to accomplish the not match on 'http'.  </p>