Re: [PHP] Regular expression

2002-07-17 Thread Michal Albrecht
Andrey Hristov wrote: > Something like this. > $your_string = preg_replace('/[\d\w]+@([\w\d]{3,}\.)+([\w]{2,4})/','', > $your_string); > > HTH > > Best regards, > Andrey Hristov Thank you very much for your time, but this strips the e-mail address and lives the domain. Could you give me some h

[PHP] Regular expression

2002-07-17 Thread Michal Albrecht
Hi, Could anyone help me with the following: I have to strip the domain from string only if it is not preceded with @ which means - when it is not an e-mail address. Examples: 1. blah blah blah [EMAIL PROTECTED] blah blah should result in: blah blah blah [EMAIL PROTECTED] blah blah 2. blah