title: Using Regex to Search for HTML links near keywords
body: <p>If I'm looking for the keyword "sales" and I want to get the nearest "http://www.somewebsite.com" even if there is multiple links in the file.  I want the nearest link not the first link.  This means I need to search for the link that comes just before the keyword match.</p>
  
  <p>This doesn't work...</p>
  
  <p><code>
  regex = (http|https)://[-A-Za-z0-9./]+.*(?!((http|https)://[-A-Za-z0-9./]+))sales
  sales
  </code></p>
  
  <p>Whats the best way to find a link that is closest to a keyword?</p>