29
4
In Vim, if I want do a search that matches "planA" or "planB", I know that I can do this:
/plan[AB]
This works because the regex allows for either A or B as its set of characters.
But how can I specify one of two complete strings? For example, "planetAwesome" or "planetTerrible"?
This will match both of these, along with "planetAnythingHereAsLongAsItsJustLetters":
planet\([a-zA-Z]*\)
How can I match only strings that match "planetAwesome" or "planetTerrible" exactly?
Actually, the brackets create a character class.
plan[ABC]
matchesplanA
,planB
, andplanC
equally well. – Christopher Bottoms – 2011-02-23T22:47:14.160@molsecules - right, thanks. I updated the question. – Nathan Long – 2011-02-23T22:53:33.527