title: Java Regex URL Matching
body: <p>I have a simple regular expression that matches some URL and it works fine however I'd like to refine it a bit so it excludes a URL containing a certain word.</p>
  
  <p>My Patter: <code>(http:[A-z0-9./~%]+)</code></p>
  
  <p>IE:</p>
  
  <pre><code>http://maps.google.com/maps
  http://www.google.com/flights/gwsredirect
  http://slav0nic.org.ua/static/books/python/
  http://webcache.googleusercontent.com/search
  http://www.python.org/ftp/python/doc/
  http://webcache.googleusercontent.com/search
  http://www.python.org/ftp/python/
  </code></pre>
  
  <p>Give the list of URL above matched by my pattern, I'd like to refine my pattern to exclude URL containing the word for example <strong>google</strong> </p>
  
  <p>I tried using non capturing groups but was unsuccessful, maybe I'm missing something. </p>
  
  <h2>ADDITIONAL INFORMATION</h2>
  
  <p>Maybe my description wasn't clear.</p>
  
  <p>Okay I have a file of data grabbed from a URL then I use the pattern I've provided with extract the list of links given but as you can see the pattern is returning all links it's doing more than I want it to do. So I want to refine it to not give me links containing a certain word ie: <strong>google</strong></p>
  
  <p>Thus after I parse the data instead of returning the list of links above it would instead return the following:</p>
  
  <pre><code>http://slav0nic.org.ua/static/books/python/
  http://www.python.org/ftp/python/doc/
  http://www.python.org/ftp/python/
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QXaha.jpg" alt="enter image description here"></p>
  
  <p>All help are appreciated, thank you!</p>