This topic came up before -- as I remeber writing a
test to compare indexof and regex....
If memory serves, I remember... If the search
string is large, like 100000 characters, then indexof wins. And if the search string is small, like 100 characters, then regex wins. (compilation of the regex was not part of the test -- regex was precompiled)
Henry