2025-03-14 21:59:59 -06:00
|
|
|
# grex
|
|
|
|
|
|
|
|
|
|
> Generate regular expressions.
|
|
|
|
|
> More information: <https://github.com/pemistahl/grex>.
|
|
|
|
|
|
|
|
|
|
- Generate a simple regular expression:
|
|
|
|
|
|
|
|
|
|
`grex {{space_separated_strings}}`
|
|
|
|
|
|
|
|
|
|
- Generate a case-insensitive regular expression:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`grex {{[-i|--ignore-case]}} {{space_separated_strings}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Replace digits with '\d':
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`grex {{[-d|--digits]}} {{space_separated_strings}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Replace Unicode word character with '\w':
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`grex {{[-w|--words]}} {{space_separated_strings}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Replace spaces with '\s':
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`grex {{[-s|--spaces]}} {{space_separated_strings}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Add {min, max} quantifier representation for repeating sub-strings:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`grex {{[-r|--repetitions]}} {{space_separated_strings}}`
|