You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
3.4 KiB
53 lines
3.4 KiB
*regexpref* |
|
|
|
Overview Regular-Expressions~ |
|
============================ |
|
|
|
|
|
+------------+------------+-----------------------------------------------+ |
|
| GREP | VIM | DESCRIPTION | |
|
+------------+------------+-----------------------------------------------+ |
|
Single-Character~ |
|
+------------+------------+-----------------------------------------------+ |
|
| | | | |
|
| . | . | matches any character | |
|
| [ ] | [ ] | matches any characters listet | |
|
| [^ ] | [^ ] | matches any characters except those listet | |
|
| \char | \char | escapes "char" if it is a metacharacter | |
|
| | | | |
|
+------------+------------+-----------------------------------------------+ |
|
Quantifiers~ |
|
+------------+------------+-----------------------------------------------+ |
|
| | | | |
|
| ? | \? | matches any character zero or one times | |
|
| * | * | matches the preceding item zero or more times | |
|
| + | \+ | matches the preceding item one or more times | |
|
| {num} | \{num} | matches the preceding item exactly num times | |
|
| {min,} | \{min,} | matches the preceding item min times | |
|
| {min,max} | \{min,max} | matches the preceding item min times, but not | |
|
| | | more than max times | |
|
| | | | |
|
+------------+------------+-----------------------------------------------+ |
|
Anchors~ |
|
+------------+------------+-----------------------------------------------+ |
|
| | | | |
|
| ^ | ^ | matches start of line | |
|
| $ | $ | matches end of line | |
|
| \< | \< | matches beginning of a word | |
|
| \> | \> | matches end of a word | |
|
| | | | |
|
+------------+------------+-----------------------------------------------+ |
|
Others~ |
|
+------------+------------+-----------------------------------------------+ |
|
| | | | |
|
| | | \| | alternation (logical OR) | |
|
| ( ) | \( \) | - sets range for alternation | |
|
| | | - groups for qualifiers | |
|
| | | - defines text for backreferences | |
|
| | | | |
|
| \1 \2... | \1 \2... | matches text in first, second ... | |
|
| | | pair of parenthesis ( ) | |
|
| | | | |
|
+------------+------------+-----------------------------------------------+ |
|
|
|
vim:tw=78:ts=4:ft=help:norl:
|
|
|