2 ms·
I was missing the trailing > in my pattern but you are still right (as is the article) It's been fun to note the benchmarks: all tested against the string:
by Jenk 6y ago
I was missing the trailing > in my pattern but you are still right (as is the article)
It's been fun to note the benchmarks:
all tested against the string:
<a href="sdfsdf">sefsefsefsef</a>
1.
(?!>).*?>
2 matches, 41 steps
2.
(?:(?!>).)*>?
3 matches, 142 steps
3. (typo?)
(?:(?!>).)*?>
2 matches, 161 steps
4.
[^>]*?>
2 matches, 6 steps
5.
[^>]*>
2 matches, 6 steps