vim regex with meta-characters -
I have text in a text file
For example this is some text cv_1 For example, this is some text for cv_001, for example this is some text for cv_15
I have to regex cv _ to match cv_1 *? Trying to use \ S
, in the text cv_001, cv_15 I know that regex works though, when I try in VIM, then nothing like this matches.
Do we need to do something special in VIM?
Pearl non-greedy "?" Do not work in four Vim, you should use it:
cv _ \ {-} \ s
Instead
cv _ *? \ S
There are some quick references to the match:
* (0 or more) greedy matching \ + (1 or more) greedy matching \ { - (0 or more) Non greedy match {{- n,} (at least n) Non greedy match
Comments
Post a Comment