firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.2k stars 198 forks source link

Can this tool help detect redos? #2221

Closed 1234www4321 closed 4 months ago

1234www4321 commented 4 months ago

Question

In the past, when I wrote the redos regular expression, it would tell me that the matching timed out, and I was used to using this tool to determine the redos. Today, when I wrote the redos, I found that it would match normally. I wonder if the tool can provide the redos detection capability.

working-name commented 4 months ago

As far as I know there's no assessment for DDOS potential of a regular expression. The timeout you bumped into was your computer and browser timing out matching your text given the regex. That's both reflective of your computer's performance and the regex's.

firasdib commented 4 months ago

It still detects catastrophic backtracking: https://regex101.com/r/dE2jet/1