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.
My Patter: (http:[A-z0-9./~%]+)
IE:
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/
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 google
I tried using non capturing groups but was unsuccessful, maybe I'm missing something.
ADDITIONAL INFORMATION
Maybe my description wasn't clear.
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: google
Thus after I parse the data instead of returning the list of links above it would instead return the following:
http://slav0nic.org.ua/static/books/python/
http://www.python.org/ftp/python/doc/
http://www.python.org/ftp/python/
All help are appreciated, thank you!