using eregi - what regular expression rules does it use ? works in linux ( grep ) but not PHP - help needed
| From: | Neil | Date: | Wed, 16 Jan 2002 18:35:22 +0000 |
| Subject: | using eregi - what regular expression rules does it use ? works in linux ( grep ) but not PHP - help needed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-80788@lists.php.net to get a copy of this message | ||
There not much documentation in the online manual about eregi. Apart from
the usage I need to know more about what regx it uses,
in the linux shell , using grep i got it right for my needs ..
I want to find and reject content with email address ..
[desiredating@opie desiredating]$ echo "neil@some.com" | grep "@*\."
neil@some.com
[desiredating@opie desiredating]$ echo "meet me @ 8" | grep "@*\."
-----------
the above is correct and fine , but see below , it doesnt work in php ( the
same regular expression doesnt )
if (eregi("@.\.",$about_me))
{
include "error_msg/error_email_in_profile.php";
$error =1 ;
}
--------
What regular expression do i neep to use , is there any reference out there
to tell me ?
Urls / info is greatly appreciatted.
Thanks in advance !!
Neil
--
Totally FREE dating site. FREE all-inclusive lifetime membership when you
join today
Meet and date new people. Thousands of members looking for someone
like you
== http://www.desiredating.com = Join FREE
today, you have
nothing to lose