Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using curly braces quantifier \d{5} in search pattern in Vim

Tags:

regex

vim

I can't seem to use this pattern in Vim: \d{4} (but can only use \d\d\d\d) while searching; Any idea whats going on?

note:

  • I am new to Vim
  • I used / in Normal Mode and typed the pattern.
like image 831
Jikku Jose Avatar asked Jan 02 '14 16:01

Jikku Jose


1 Answers

/\d\{4}

or

/\v\d{4}

read :h magic for details

like image 196
Kent Avatar answered Sep 20 '22 12:09

Kent