Posted by Paul E Collins on 10/13/44 11:39
"Jim Michaels" <jmichae3@nospam.yahoo.com> wrote:
> [...]
> > > Why does $string = 'te\st' yield a match? The
> > > ereg expression doesn't have a \\ in it...
> > the \ is escaping the s, so is invisible to the regular
> > expression. To have an \ in the string, you'd need
> > to see \\
>
> That's not true. \s is whitespace. tabs or spaces.
"\s" means whitespace in a regular expression, but not in the string
being matched against.
P.
Navigation:
[Reply to this message]
|