in reply to You don't always have to use regexes

It's quite interesting to time this and see just how much performance is gained. Additionally, I'm curious whether the regex engine has, or planned to have optimizations on "static" expressions like this ?

Additionally, usage of substr can save quite a few regular expressions here and there.

But the rule of thumb should be: use whatever seems more natural for the problem at hand, and optimize only if necessary.

  • Comment on Re: You don't always have to use regexes