yes I have a typo in the post. It shoud be ^\s, but that still doesn't give me an answer.If you fix that typo and then run Benchmarks, I think you will see that they are about the same speed. I see speed differences of 0-3% with the typo fixed, and 20-25% with the typo in place.... probably because some optimization is possible when the regex says "beginning of string" and not '^' in an arbitrary place in the string.
In reply to Re^3: question about reg exp engine
by broomduster
in thread question about reg exp engine
by chuckd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |