Merge pull request #11 from fabriziosalmi/codeflash/optimize-validate_regex-m6xp4bpf

️ Speed up function `validate_regex` by 2,003%
This commit is contained in:
fab 2025-02-09 15:14:42 +01:00 committed by GitHub
commit 870da8e1c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,7 @@ def load_owasp_rules(file_path):
raise
@lru_cache(maxsize=None)
def validate_regex(pattern):
"""Validate if a pattern is a valid regex."""
try: