mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-03 08:55:05 +00:00
Update cheatsheets
This commit is contained in:
28
tldr/grex
28
tldr/grex
@@ -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 ...}}`
|
||||
|
||||
Reference in New Issue
Block a user