Generate a random string that matches a regular expression

exrex

  • Generate all/random matching strings for a regular expression.
    It can also simplify regular expressions.
    More information: <https://github.com/asciimoo/exrex>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

exrex --random '{{regular_expression}}'

click the source code to copy