Using Regular Expressions Efficiently
The results of performance tests show that the new
RWTRegex<T> interface performs matching operations approximately seven to eight times faster than did the previous interface. Compiling the original pattern is, however, slightly slower.
To maximize efficiency when pattern matching, first instantiate
RWTRegex<T> to compile the pattern once. Then perform any repeated matching operations.