{"categories":[{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing"}],"enrichment":{"capability":"Interegular checks whether pairs of Python regular expressions can match overlapping strings, converting regex patterns to finite-state machines to detect intersections.","skillfed_tags":["regex-analysis","fsm","pattern-matching"],"use_cases":["Detect conflicting patterns in a parser or lexer to warn about ambiguous token definitions.","Validate that two regex-based validation rules do not overlap in unexpected ways.","Analyze a set of URL routing patterns to find potential collisions.","Check whether input sanitization regexes and attack patterns intersect.","Test regex-based firewall or IDS rules for unintended overlaps."],"what_it_does":"Interegular is a library for detecting whether pairs of Python regular expressions can match overlapping input strings. It parses regex patterns into finite-state machines (FSMs) and compares them to find intersections, returning pairs of patterns that overlap. The library is adapted from grennery but optimized for speed and compatibility with Python's re module syntax.\n\nThe package exposes a high-level API (compare_regexes) for quick intersection checks and lower-level Pattern and FSM classes for more detailed analysis. It supports most common regex syntax but explicitly does not handle backreferences, conditional matching, or all lookahead/lookbehind cases\u2014these limitations are inherent to the FSM-based approach. It is useful in parser generators, validation rule analysis, and regex conflict detection.","worth_installing":"Yes, if you need to detect regex intersections and can work within its constraints. The library is lightweight, has no dependencies, and works on current Python versions. Dormant maintenance is a minor concern but not a blocker for a stable utility. Avoid it if your patterns rely heavily on backreferences, conditionals, or complex lookaheads."},"id":"interegular","links":{"html":"https://skillfed.io/packages/interegular","md":"https://skillfed.io/packages/interegular.md","pypi":"https://pypi.org/project/interegular/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-01-06","license_spdx":null,"license_treatment":"permissive","name":"interegular","python_support":"supports_current","summary":"a regex intersection checker"},"popularity":{"monthly_downloads":5193419,"position":2144,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.3.3"}
