Vim regular expression for range of numbers - Not working
regex, vim
Solution
You have to escape the pipe in Vim:
:/28[89]\|29[0-9]\|30[0-3]/
Edit:
Per @Tim's comment, you can optionally prefix the pattern with `\v` instead of escaping the individual pipe characters:
:/\v28[89]|29[0-9]|30[0-3]/
Thanks @Tim.
Problem
I have the following regular expression for range `288-303` but it is not working in GVim. The regexp is `:/28[89]|29[0-9]|30[0-3]/`. Could anyone please point out the reason. I referred Stack Overflow and got the regexp from http://utilitymill.com/utility/Regex_For_Range/42.