John Nichel wrote:
Personally, I have never used \\ in PCRE when looking for things like spaces (\s), word boundraries (\b), etc. and it's all worked out fine.
It will work fine, but only because those (\s and \b) just happen to not be special characters in PHP *at this time*.
It's sloppy programming because the backslash is known to be a special character, and \s or \b could conceivably become special characters at some time in the future. It's unlikely, but possible.
Not only that, but it makes it more likely that you'll forget and put \n when you meant \\n, \r when you meant \\r, \t when you meant \\t, and so on...
Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php