Jump to content

Regular expressions - finding a pattern that does not consist of "xyz"


Michan

Recommended Posts

Hi everyone,

 

I'm trying to select any url that does not consist of a "\" (backslash), "mail", "ftp", or "www".

 

This is what I have:

([^/|(www|ftp|mail)]+)

 

However, that blocks out any urls that contain the letters "w", "f", "t", "p", "m", "a", "i", and "l". Other urls work fine.

 

How should this expression look if I want to block the whole words rather than the letters of them?

 

Thanks in advance!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.