or download this
Benchmark: timing 100000 iterations of if_regex, if_substr, regex, sub
+str...
if_regex: 3 wallclock secs ( 2.50 usr + 0.00 sys = 2.50 CPU) @ 40
+000.00/s (n=100000)
if_substr: 2 wallclock secs ( 2.47 usr + 0.00 sys = 2.47 CPU) @ 40
+485.83/s (n=100000)
...
substr 38911/s 90% -- -3% -4%
if_regex 40000/s 95% 3% -- -1%
if_substr 40486/s 98% 4% 1% --