hehe... that's what regular expressions are for.
they're extrememly powerful... but that doesnt mean that
you should only use them for extremely complicated situations.
they work great everywhere... 

if you dont like "overdoing it", you might as well loop
thru the string character by character, C-style.  :-)

> -----Original Message-----
> From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] RE: string search
> 
> Couldn't he just do something like
> 
> if (strstr($text, "aol.com")) {
>    MyFunction();
> } else {
>    echo "Not Found";
> }
> 
> It just seems like using ereg for this is like killing a fly with a
> sledgehammer
> 
> Sheridan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to