mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-01 10:55:24 +02:00
Fix extended regular expressions
By default, grep already uses regular expressions when searching. The example `grep -e {{^regex$}} {{path/to/file}}` is the same as `grep {{^regex$}} {{path/to/file}}`. However, because of the comment about extended regular expressions, I mistakenly assumed `-e` was the option to enable it. I believe most people would refer to `tldr` in this use case looking for the `-E` extended regular expressions. With this in mind, I believe that example would be better rephrased as this pull request makes it.
This commit is contained in:
parent
ed44949bcb
commit
0579b0993c
1 changed files with 2 additions and 2 deletions
|
@ -15,9 +15,9 @@
|
|||
|
||||
`grep -rI {{search_string}} .`
|
||||
|
||||
- Use a regular expression (`-E` for extended regex, supporting `?`, `+`, `{}`, `()` and `|`):
|
||||
- Use extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`):
|
||||
|
||||
`grep -e {{^regex$}} {{path/to/file}}`
|
||||
`grep -E {{^regex$}} {{path/to/file}}`
|
||||
|
||||
- Print 3 lines of context around each match:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue