multiple pages: normalize regular expression instead of regex, regexp or pattern (#5830)

This commit is contained in:
marchersimon
2021-05-10 11:03:12 +02:00
committed by GitHub
parent fd7936c944
commit 10728f1ab4
37 changed files with 74 additions and 66 deletions

View File

@@ -4,33 +4,33 @@
> Aims to be a faster alternative to `grep`.
> More information: <https://github.com/BurntSushi/ripgrep>.
- Recursively search the current directory for a regex pattern:
- Recursively search the current directory for a regular expression:
`rg {{pattern}}`
`rg {{regular_expression}}`
- Search for pattern including all .gitignored and hidden files:
- Search for regular expressions including all .gitignored and hidden files:
`rg --no-ignore --hidden {{pattern}}`
`rg --no-ignore --hidden {{regular_expression}}`
- Search for a pattern only in a certain filetype (e.g., html, css, etc.):
- Search for a regular expression only in a certain filetype (e.g., html, css, etc.):
`rg --type {{filetype}} {{pattern}}`
`rg --type {{filetype}} {{regular_expression}}`
- Search for a pattern only in a subset of directories:
- Search for a regular expression only in a subset of directories:
`rg {{pattern}} {{set_of_subdirs}}`
`rg {{regular_expression}} {{set_of_subdirs}}`
- Search for a pattern in files matching a glob (e.g., `README.*`):
- Search for a regular expression in files matching a glob (e.g., `README.*`):
`rg {{pattern}} --glob {{glob}}`
`rg {{regular_expression}} --glob {{glob}}`
- Only list matched files (useful when piping to other commands):
`rg --files-with-matches {{pattern}}`
`rg --files-with-matches {{regular_expression}}`
- Show lines that do not match the given pattern:
- Show lines that do not match the given regular expression:
`rg --invert-match {{pattern}}`
`rg --invert-match {{regular_expression}}`
- Search a literal string pattern: