preg_match problem.
Posted
by SoLoGHoST
on Stack Overflow
See other posts from Stack Overflow
or by SoLoGHoST
Published on 2010-05-03T18:55:34Z
Indexed on
2010/05/03
18:58 UTC
Read the original article
Hit count: 334
How do I add the character -
within the preg_match?
preg_match('#^(\w+/){0,2}\w+\.\w+$#', $string)
But it must be before the . within string. I've tried just about everything I know here. I know that the - needs to be escaped. So I tried to escape it in various places, but it's not working :(
Thanks :)
© Stack Overflow or respective owner