Michan Posted March 3, 2008 Share Posted March 3, 2008 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! Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 3, 2008 Share Posted March 3, 2008 im not good at regex but try $string = 'www'; if (eregi('((www)|(ftp)|(mail))', $string)) { echo "'$string'"; } Quote Link to comment Share on other sites More sharing options...
dsaba Posted March 4, 2008 Share Posted March 4, 2008 I had a great reply but phpfreaks keeps giving me this error msg, so I can't post it: Method Not Implemented POST to /forums/index.php not supported. Apache/2.2.0 (Linux) Server at www.phpfreaks.com Port 80 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.