Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-20 00:20:48 +00:00
parent c80d49f5d0
commit 96cc0e16c6
10 changed files with 189 additions and 22 deletions

View File

@@ -10,24 +10,32 @@ source: https://github.com/tldr-pages/tldr.git
- Generate a simple `regex`:
`grex {{space_separated_strings}}`
`grex {{string1 string2 ...}}`
- Generate a case-insensitive `regex`:
`grex {{[-i|--ignore-case]}} {{space_separated_strings}}`
`grex {{[-i|--ignore-case]}} {{string1 string2 ...}}`
- Replace digits with '\d':
- Replace digits with `\d`:
`grex {{[-d|--digits]}} {{space_separated_strings}}`
`grex {{[-d|--digits]}} {{string1 string2 ...}}`
- Replace Unicode word character with '\w':
- Replace Unicode word character with `\w`:
`grex {{[-w|--words]}} {{space_separated_strings}}`
`grex {{[-w|--words]}} {{string1 string2 ...}}`
- Replace spaces with '\s':
- Replace spaces with `\s`:
`grex {{[-s|--spaces]}} {{space_separated_strings}}`
`grex {{[-s|--spaces]}} {{string1 string2 ...}}`
- Add {min, max} quantifier representation for repeating sub-strings:
- Detect repeating patterns in the input and shorten them using {min,max} quantifiers:
`grex {{[-r|--repetitions]}} {{space_separated_strings}}`
`grex {{[-r|--repetitions]}} {{string1 string2 ...}}`
- Generate `regex` of test cases (separated by newline) from a file:
`grex {{[-f|--file]}} {{path/to/file}}`
- Do not generate anchors and non-capture groups:
`grex --no-anchors {{[-g|--capture-groups]}} {{string1 string2 ...}}`