Regex Lookbehind help
| From: | Alex Hogan | Date: | Tue, 26 Oct 2004 18:39:14 +0000 |
| Subject: | Regex Lookbehind help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200380@lists.php.net to get a copy of this message | ||
Hi All,
I am trying to identify an email address in a page but I don't want to
return the email if it's webmaster@whatever.com.
Here's what I have;
(\w[-._\w]*\w(?<!webmaster)@\w[-._\w]*\w\.\w{2,3})
It returns nothing, however when I take out the lookbehind section;
(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})
it works fine, returning all email addresses in a page.
What is wrong with my syntax?
alex hogan