Regular Expression in Vim that will count 1 or colon

I am rather new to using vim with regular expressions and I need to count specific entries in a .csv file The entries are in this form:


I need to count the number of 8-Mar-11, A2 conditions which have either ,, or ,1 (,|1) or (,|1),1 on the end of the lines.

here is the regular expression that i use in vim to get some count data:


What I would like to know is there a way to use either in vim? like:


Any advice or help is greatly appreciated!


When you're composing a regular expression which is searching for one character or another, alternation using pipes is overkill. Use a character class instead:


VIM regexes are weird and confusing. You have to escape the | as \| for or

Need Your Help

Tinyint used for true/false

php mysql

I created a table person with two tinytint fields to decide the role of a person. The roles are instructor and faculty. A person can be one or both. I preferred to use tinyint since I can possibly ...

google account sync on android 2.2 device

android android-c2dm

I am implementing C2DM for push notification in an android application, it need at least

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.