To find a single, standalone aa
(not a
, aaa
, ...), you need to assert no match of that character both before and afterwards. This is done with negative lookbehind (\@<!
in Vim's regular expression syntax) and lookahead (\@!
) enclosing the match itself (a\{2}
):
/\%(a\)\@<!a\{2}\%(a\)\@!/
Simplification
Those assertions are hard to type, if the border around the match is also a non-keyword / keyword border, you can use the shorter \<\a\{2}\>
assertions (as in LSchueler's answer), but this doesn't work in the general case, e.g. with xaax
.