+, ?, |, {, }, (, and ) must be escaped to use their special function.


I love regex as a rule. I'm not as big a fan of individual implementations of its concepts. Couldn't figure out how to get X repetitions of a pattern while searching in VIm, and it's because { has to have a \ to work.

Who knew? Voodoo. What up with that?

So if I'm looking for table names over 30 characters in a text file (as Oracle doesn't like identifiers over 30 chars -- spits it out), the "right" regex is...

/[A-Z_]{30}

But for VIm it's:

/[A-Z_]\{30\}

(Yes, characters in the name must be caps or underscores)

Profit.

Labels: , ,