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
  • etc

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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top