LinuxCommandLibrary

exrex

Generate all/random matching strings for a regular expression.

TLDR

Generate all possible strings that match a regular expression

$ exrex '[regular_expression]'
copy


Generate a random string that matches a regular expression
$ exrex --random '[regular_expression]'
copy


Generate at most 100 strings that match a regular expression
$ exrex --max-number [100] '[regular_expression]'
copy


Generate all possible strings that match a regular expression, joined by a custom delimiter string
$ exrex --delimiter "[, ]" '[regular_expression]'
copy


Print count of all possible strings that match a regular expression
$ exrex --count '[regular_expression]'
copy


Simplify a regular expression
$ exrex --simplify '[ab|ac]'
copy


Print eyes
$ exrex '[[oO0](_)[oO0]]'
copy


Print a boat
$ exrex '[( {20}(\| *\\|-{22}|\|)|\.={50}| ( ){0,5}\\\.| {12}~{39})]'
copy

Copied to clipboard