{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/5"}],"enrichment":{"capability":"Exrex generates all or random strings matching a given regular expression, counts matches, and simplifies regex patterns. It works as both a Python module and command-line tool with no external dependencies.","skillfed_tags":["regex-testing","test-data-generation"],"use_cases":["Generate test data matching a regex pattern for unit tests or property-based testing frameworks","Fuzz testing: produce random strings matching an input format to find edge cases in parsers or validators","Verify regex correctness by examining all or a sample of strings the pattern actually matches","Simplify complex regex patterns to equivalent but more readable forms for documentation or refactoring","Count the number of possible matches for a pattern to understand its scope or validate assumptions"],"what_it_does":"Exrex is a Python module and CLI tool that works backward from a regular expression to generate matching strings. Instead of testing whether a string matches a pattern, it produces strings that will match. It can enumerate all possible matches (useful for testing), pick random ones (useful for fuzzing), count how many exist, or simplify the pattern itself. The package uses generators to keep memory usage constant regardless of how many matches exist, making it practical for patterns with large or infinite match spaces.\n\nThe tool is pure Python with no external dependencies, making it trivial to install. It supports both programmatic use through functions like `getone()`, `generate()`, and `count()`, and direct command-line invocation with options to limit output, write to files, or run in random mode. Patterns with infinite repetition (like `[a-z]+`) are handled by capping the maximum length of those parts.","worth_installing":"Yes, if you need to generate test data or validate regex patterns. The zero-dependency design and generator-based memory efficiency make it low-risk to add. However, the AGPLv3+ license requires careful review if you plan to distribute code that incorporates it; for internal testing or CLI use, this is less of a concern. No known vulnerabilities and active maintenance support the choice."},"id":"exrex","links":{"html":"https://skillfed.io/packages/exrex","md":"https://skillfed.io/packages/exrex.md","pypi":"https://pypi.org/project/exrex/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-11-13","license_spdx":null,"license_treatment":"agpl","name":"exrex","python_support":"unspecified","summary":"Irregular methods for regular expressions"},"popularity":{"monthly_downloads":518516,"position":6220,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.12.0"}
