exrex
reverse regex matching string generator
TLDR
Generate strings from regex
SYNOPSIS
exrex [options] regex
DESCRIPTION
exrex is a command-line tool and Python library that generates all or random strings matching a given regular expression. It's useful for testing, fuzzing, and generating sample data.
The tool parses regex patterns and produces strings that would match, rather than matching existing strings. It supports most common regex features including character classes, quantifiers, groups, and alternation.
exrex is particularly useful for generating test inputs, creating wordlists, or understanding what patterns a regex would match.
PARAMETERS
REGEX
Regular expression pattern to generate strings from.-a, --all
Generate all possible matching strings.-c N, --count N
Limit output to N strings.-r, --random
Generate random matching string.-n, --num
Print count of possible matches.-d DELIM, --delimiter DELIM
Output delimiter (default newline).--help
Display help information.
CAVEATS
Unlimited quantifiers (*, +) are bounded by default. Complex patterns may generate massive output. Not all regex features supported. Memory usage scales with output size.
HISTORY
exrex is a Python-based regex string generator created for testing and security research, providing reverse regex matching capabilities for generating test data and wordlists.
