multiple pages: normalize regular expression
instead of regex
, regexp
or pattern
(#5830)
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
|
||||
`csvgrep -c {{1}} -m {{string_to_match}} {{data.csv}}`
|
||||
|
||||
- Find rows in which columns 3 or 4 match a certain regex pattern:
|
||||
- Find rows in which columns 3 or 4 match a certain regular expression:
|
||||
|
||||
`csvgrep -c {{3,4}} -r {{regex_pattern}} {{data.csv}}`
|
||||
`csvgrep -c {{3,4}} -r {{regular_expression}} {{data.csv}}`
|
||||
|
||||
- Find rows in which the "name" column does NOT include the string "John Doe":
|
||||
|
||||
|
@@ -22,8 +22,8 @@
|
||||
|
||||
- Display all lines except those that contain the given regular expression:
|
||||
|
||||
`fgrep -v {{^regex$}} {{path/to/file}}`
|
||||
`fgrep -v {{regular_expression}} {{path/to/file}}`
|
||||
|
||||
- Display filenames whose content matches the regular expression at least once:
|
||||
|
||||
`fgrep -l {{^regex$}} {{path/to/file1}} {{path/to/file2}}`
|
||||
`fgrep -l {{regular_expression}} {{path/to/file1}} {{path/to/file2}}`
|
||||
|
@@ -5,7 +5,7 @@
|
||||
|
||||
- Search for remote gem(s) and show all available versions:
|
||||
|
||||
`gem search {{regexp}} --all`
|
||||
`gem search {{regular_expression}} --all`
|
||||
|
||||
- Install latest version of a gem:
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
` grex {{space_separated_strings}}`
|
||||
|
||||
- Generate a case-insensitive regex:
|
||||
- Generate a case-insensitive regular expression:
|
||||
|
||||
`grex -i {{space_separated_strings}}`
|
||||
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
`httpflow {{host httpbin.org or host baidu.com}}`
|
||||
|
||||
- Use a regexp to filter requests by urls:
|
||||
- Use a regular expression to filter requests by urls:
|
||||
|
||||
`httpflow -u '{{regex}}'`
|
||||
`httpflow -u '{{regular_expression}}'`
|
||||
|
||||
- Read packets from pcap format binary file:
|
||||
|
||||
|
@@ -7,13 +7,17 @@
|
||||
|
||||
`jest`
|
||||
|
||||
- Run the test suites from files whose paths match the given regex patterns:
|
||||
- Run the test suites from the given files:
|
||||
|
||||
`jest {{test_file1}} {{path/to/test_file2.js}}`
|
||||
`jest {{path/to/file1}} {{path/to/file2}}`
|
||||
|
||||
- Run the tests whose names match the given regex pattern:
|
||||
- Run the test suites from files within the current and subdirectories, whose paths match the given regular expression:
|
||||
|
||||
`jest --testNamePattern {{spec_name}}`
|
||||
`jest {{regular_expression1}} {{regular_expression2}}`
|
||||
|
||||
- Run the tests whose names match the given regular expression:
|
||||
|
||||
`jest --testNamePattern {{regular_expression}}`
|
||||
|
||||
- Run test suites related to a given source file:
|
||||
|
||||
|
@@ -11,9 +11,9 @@
|
||||
|
||||
`linkchecker --check-extern {{https://example.com/}}`
|
||||
|
||||
- Ignore URLs that match a specific regex:
|
||||
- Ignore URLs that match a specific regular expression:
|
||||
|
||||
`linkchecker --ignore-url {{regex}} {{https://example.com/}}`
|
||||
`linkchecker --ignore-url {{regular_expression}} {{https://example.com/}}`
|
||||
|
||||
- Output results to a CSV file:
|
||||
|
||||
|
@@ -29,4 +29,4 @@
|
||||
|
||||
- Filter lines of a compressed CSV file treating numbers as strings:
|
||||
|
||||
`mlr --prepipe 'gunzip' --csv filter -S '${{fieldName}} =~ "{{regexp}}"' {{example.csv.gz}}`
|
||||
`mlr --prepipe 'gunzip' --csv filter -S '${{fieldName}} =~ "{{regular_expression}}"' {{example.csv.gz}}`
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
- Run tests that match a specific grep pattern:
|
||||
|
||||
`mocha --grep {{^regex$}}`
|
||||
`mocha --grep {{regular_expression}}`
|
||||
|
||||
- Run tests on changes to JavaScript files in the current directory and once initially:
|
||||
|
||||
|
@@ -24,9 +24,9 @@
|
||||
|
||||
`<Esc>/{{search_pattern}}<Enter>`
|
||||
|
||||
- Perform a regex substitution in the whole file:
|
||||
- Perform a regular expression substitution in the whole file:
|
||||
|
||||
`<Esc>:%s/{{pattern}}/{{replacement}}/g<Enter>`
|
||||
`<Esc>:%s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
||||
|
||||
- Save (write) the file, and quit:
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
|
||||
- Use "~" to match a string with a given regular expression:
|
||||
|
||||
`recsel -e "{{field_name}} ~ '{{pattern_regex}}' {{data.rec}}"`
|
||||
`recsel -e "{{field_name}} ~ '{{regular_expression}}' {{data.rec}}"`
|
||||
|
||||
- Use a predicate to match a name and a version:
|
||||
|
||||
`recsel -e "name ~ '{{pattern_regex}}' && version ~ '{{pattern_regex}}'" {{data.rec}}`
|
||||
`recsel -e "name ~ '{{regular_expression}}' && version ~ '{{regular_expression}}'" {{data.rec}}`
|
||||
|
@@ -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:
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
> Intuitive find & replace CLI.
|
||||
|
||||
- Trim some whitespace using regex:
|
||||
- Trim some whitespace using a regular expression:
|
||||
|
||||
`{{echo 'lorem ipsum 23 '}} | sd '\s+$' ''`
|
||||
|
||||
|
@@ -5,11 +5,11 @@
|
||||
|
||||
- Replace the first occurrence of a regular expression in each line of a file, and print the result:
|
||||
|
||||
`sed 's/{{regex}}/{{replace}}/' {{filename}}`
|
||||
`sed 's/{{regular_expression}}/{{replace}}/' {{filename}}`
|
||||
|
||||
- Replace all occurrences of an extended regular expression in a file, and print the result:
|
||||
|
||||
`sed -r 's/{{regex}}/{{replace}}/g' {{filename}}`
|
||||
`sed -r 's/{{regular_expression}}/{{replace}}/g' {{filename}}`
|
||||
|
||||
- Replace all occurrences of a string in a file, overwriting the file (i.e. in-place):
|
||||
|
||||
|
@@ -22,4 +22,4 @@
|
||||
|
||||
- Exclude files matching a regular expression:
|
||||
|
||||
`stow --ignore={{regex}} --target={{path/to/target_directory}} {{file1 directory1 file2 directory2}}`
|
||||
`stow --ignore={{regular_expression}} --target={{path/to/target_directory}} {{file1 directory1 file2 directory2}}`
|
||||
|
@@ -28,9 +28,9 @@
|
||||
|
||||
`/{{search_pattern}}<Enter>`
|
||||
|
||||
- Perform a regex substitution in the whole file:
|
||||
- Perform a regular expression substitution in the whole file:
|
||||
|
||||
`:%s/{{pattern}}/{{replacement}}/g<Enter>`
|
||||
`:%s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
||||
|
||||
- Display the line numbers:
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# z
|
||||
|
||||
> Tracks the most used (by frecency) directories and enables quickly navigating to them using string or regex patterns.
|
||||
> Tracks the most used (by frecency) directories and enables quickly navigating to them using string patterns or regular expressions.
|
||||
> More information: <https://github.com/rupa/z>.
|
||||
|
||||
- Go to a directory that contains "foo" in the name:
|
||||
|
@@ -4,7 +4,7 @@
|
||||
> See also `zcp` and `zln`.
|
||||
> More information: <http://zsh.sourceforge.net/Doc/Release/User-Contributions.html>.
|
||||
|
||||
- Move files using a regex-like pattern:
|
||||
- Move files using a regular expression-like pattern:
|
||||
|
||||
`zmv '{{(*).log}}' '{{$1.txt}}'`
|
||||
|
||||
|
Reference in New Issue
Block a user