On 03/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>  Hi Phill,
>              My understanding is that the REGEX engine loads into ram and
>  consumes resources as both RAM and CPU cycles.
>
>  Normally I would use REGEX if I am loading it anyway to use for something
>  like validating user input but otherwise I avoid loading it for simple
>  tasks.
>
>  Is this right? or have I been misled ?
>
>  Thanks, Rob.
>

Hi Rob,

You're quite right there...   I guess I've climbed so far up the regex
mountain that I've lost sight of the php basics on the ground!

One thing from your example that you might consider is using !==
rather than != otherwise you might end up with \n\n at the beginning
of your string when strpos returns 0 rather than false.

Regards, Phill

Reply via email to