vim regex matching with Uppercase letters but NOT underscore

In vim regex syntax, I am trying to match with all words with starting uppercase, and not starting underscore

([A-Z][a-z_][A-Za-z_]+)

This is the what i have untill now.

I want something like this:

([A-Z^_][a-z_][A-Za-z_]+)

Where [A-Z^_] denotes that it should match with all uppercase chars, but not underscore.

Any help would be greatly apreciated. Thanks in advance.

Edit: My question was woorded poorly. I want the first set to match with an uppercase char, which does not have an underscore in front of it. Sorry.


Source: regex

Leave a Reply