LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Regular expression question (http://www.linuxquestions.org/questions/linux-general-1/regular-expression-question-377726/)

gauge73 10-28-2005 10:08 AM

Regular expression question
 
I've been trying desparately to figure out how to write a regular expression that will match any string except a particular URL. I can't, however, figure out how to do an inverse of an expression. Can anyone tell me how I might do this? I've tried the following (example for www.google.com):

http:\/\/...\.[^g][^o][^o][^g][^l][^e]

But it has weaknesses including the fact that any domain name starting with a "g" will not match. Can you guys point me in the right direction?

MensaWater 10-28-2005 10:30 AM

Duplicate thread here. I replied to the other one.

gauge73 10-28-2005 10:32 AM

Yes, I'm sorry about that. I'm pretty sure I only clicked submit once. I am, however, using a beta HTTP proxy device. I'm going to blame that. ;)


All times are GMT -5. The time now is 06:05 PM.