RE: Regex Lookbehind help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alex Hogan wrote:
> 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@xxxxxxxxxxxxx
>
> 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?

I just tried this out and the first regex is actually working for me on php 4.3.8
(cli).  Can you post some code?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux