in reply to Re: Optimizing string searches
in thread Optimizing string searches
regex string1 (if match write ouput) regex string2 (if match ...) regex string3 (if match ...) regex string4 (if match ...)
It's usually faster to build one regex with four alternations and match that instead of matching four single regexes against a string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Optimizing string searches
by johndageek (Hermit) on Sep 11, 2008 at 13:46 UTC |