|
Posted by cluthz on 05/22/07 01:28
Help,
I'm having this strange problem where my regular expression will not match
blank space.
Obviously I'm doing something wrong, but what?
Lets say I have a string such as
$test = "my example"
then I want to search it for a string
ereg ("\se",$test)
I would expect the above to return true but it returns false.
When I amend it to:
ereg ("e",$test)
I get a true response as expected.
when I try
ereg ("\s",$test)
It returns false. (I would expect true as there is a space in the string).
Please tell me what I'm doing wrong. It's driving me nuts
Thanks in advance.
Navigation:
[Reply to this message]
|