1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 12:45:59 +02:00

exrex: add page (#5296)

This commit is contained in:
bl-ue 2021-02-25 12:46:24 -05:00 committed by GitHub
parent 4364446e17
commit 473b1ac11a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

37
pages/common/exrex.md Normal file
View file

@ -0,0 +1,37 @@
# exrex
> Generate all/random matching strings for a regular expression.
> It can also simplify regular expressions.
> More information: <https://github.com/asciimoo/exrex>.
- Generate all possible strings that match a regular expression:
`exrex '{{regular_expression}}'`
- Generate a random string that matches a regular expression:
`exrex --random '{{regular_expression}}'`
- Generate at most 100 strings that match a regular expression:
`exrex --max-number {{100}} '{{regular_expression}}'`
- Generate all possible strings that match a regular expression, joined together by a custom delimiter string:
`exrex --delimiter "{{, }}" '{{regular_expression}}'`
- Print count of all possible strings that match a regular expression:
`exrex --count '{{regular_expression}}'`
- Simplify a regular expression:
`exrex --simplify '{{ab|ac}}'`
- Print eyes:
`exrex '{{[oO0](_)[oO0]}}'`
- Print a boat:
`exrex '{{( {20}(\| *\\|-{22}|\|)|\.={50}| ( ){0,5}\\\.| {12}~{39})}}'`