Comments by "yapdog" (@yapdog) on "ThePrimeTime"
channel.
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
I created my own regex engine that's not susceptible to that kind of error. This classic test regex from Rexegg:
"^(A+)*B"
With that pattern, a string as simple as "AAAAAAAAAAC" would require 3,584 steps. But a string with 100 A's followed by 1 C would cause a catastrophic backtracking failure, requiring 4,436,777,100,798,802,905,238,461,218,816 steps. Those numbers scared the sh!t out of me!😱 And if they don't scare you, then you haven't been paying attention.
I finally just dumped all the standard regex models and built one completely from scratch (yes, in C😛). My engine significantly reduces the amount of backtracking: the 100 A string is resolved in just 1295 steps. 😁😁😁I'm still benchmarking it, but this engine is incredibly promising.........🤞
1
-
1
-
1
-
1
-
1
-
1