Regular expression search, exclude a word

regex, visual-studio-2010

Solution

This search regex should do the trick: `~(mess)age`

`~(X)` is a Prevent match on `X`.

To ignore `Tabpages` as well, you can use `~(mess|tabp)age`. Basically `|` is used as OR, like prevent match on `mess` OR `tabp`, you can add additional words via `|`.

Problem

I like to search for a words containing string `age` in Visual Studio Find, I like to find `age` in `CCAge` or in any other string (like `sage`, `mage`, `abcAGExyz`) but not in `message`. How can I achieve this?

Original source