Options (7)
-i, --ignore-casebooleanGenerate a case-insensitive `regex`
Example:
grex {{[-i|--ignore-case]}} {{string1 string2 ...}}-d, --digitsbooleanReplace digits with `\d`
Example:
grex {{[-d|--digits]}} {{string1 string2 ...}}-w, --wordsbooleanReplace Unicode word character with `\w`
Example:
grex {{[-w|--words]}} {{string1 string2 ...}}-s, --spacesbooleanReplace spaces with `\s`
Example:
grex {{[-s|--spaces]}} {{string1 string2 ...}}-r, --repetitionsbooleanDetect repeating patterns in the input and shorten them using {min,max} quantifiers
Example:
grex {{[-r|--repetitions]}} {{string1 string2 ...}}-f, --filebooleanGenerate `regex` of test cases (separated by newline) from a file
Example:
grex {{[-f|--file]}} {{path/to/file}}-g, --capture-groupsbooleanDo not generate anchors and non-capture groups
Example:
grex --no-anchors {{[-g|--capture-groups]}} {{string1 string2 ...}}Examples (8)
Generate a simple `regex`
grex string1 string2 ...Generate a case-insensitive `regex`
grex [-i|--ignore-case] string1 string2 ...Replace digits with `\d`
grex [-d|--digits] string1 string2 ...Replace Unicode word character with `\w`
grex [-w|--words] string1 string2 ...Replace spaces with `\s`
grex [-s|--spaces] string1 string2 ...Detect repeating patterns in the input and shorten them using {min,max} quantifiers
grex [-r|--repetitions] string1 string2 ...Generate `regex` of test cases (separated by newline) from a file
grex [-f|--file] path/to/fileDo not generate anchors and non-capture groups
grex --no-anchors [-g|--capture-groups] string1 string2 ...made by @shridhargupta | data from tldr-pages