You can use word boundaries (denoted by \b
) around the literal Box
to only match the word "Box" (and not "Boxes" or "pBox" or some other prefix/suffix):
\bBox\b
Question
I need to find all instances of type xxx::Box in a VC++ solution. Searching for "xxx::Box" is easy, but often the namespace isn't used... searching for "Box" also matches
GetBoundingBox()
*pBox
//how many Boxes
I was wondering if the weird VS regex searching could help me, but I'm not sure. How can I only search for Box
when it could be at the start of a line, or a parameter type, etc?
La solution
You can use word boundaries (denoted by \b
) around the literal Box
to only match the word "Box" (and not "Boxes" or "pBox" or some other prefix/suffix):
\bBox\b