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.
In reply to Re: You don't always have to use regexes
by spurperl
in thread You don't always have to use regexes
by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |