Using Grep or regex is textual refactoring. If you want to rename every reference to a type Foo, how do you is that without touching any variables named foo, or any classes named FooBar
The answer is use tools that have semantic info to rename things.
The answer is use tools that have semantic info to rename things.