in reply to Very slow regex substitution on Unicode string
I don't know what your data looks like, but if you can make limits on the regex based on what you know about the data, then that will help. For instance, in the HTML comments you're capturing HINT followed by almost anything. Does it need to be that liberal? Or are you really only looking for HINT followed by some non-whitespace? If you can change the HINT.*? part of your regex to HINT\S* you will get much faster times.
Of course, that's just a guess on my part, but anything you can do to help the regex matcher limit its range of work, the better.
xoxo,
Andy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Very slow regex substitution on Unicode string
by pbijnens (Novice) on May 26, 2011 at 06:58 UTC | |
by Anonymous Monk on May 26, 2011 at 15:11 UTC |