Is there any reason why Visual Studio uses such a strange syntax (for instance in the search/replace dialog)?
Instead of writing \\s*(\\w+) = new Process\\(\\)
My best and most honest answer is because they are Microsoft therefore they can use whatever standard they choose. Some programmer somewhere probably decided that the above syntax was clearer to them or easier to code for and therefore it became canon law.
I quote Coding Horror:
However, you're in for an unpleasant surprise when you attempt to actually use regular expressions to find anything in Visual Studio. Apparently the Visual Studio IDE has its own bastardized regular expression syntax. Why? Who knows. Probably for arcane backwards compatibility reasons, although I have no idea why you'd want to perpetually carry forward insanity. Evidently it makes people billionaires, so who am I to judge.
http://www.codinghorror.com/blog/2006/07/the-visual-studio-ide-and-regular-expressions.html
Well, they tried to make it "easier" to use, it seems, for a C++ coder.
Consider they provided new non-standard expressions, like
C/C++ Identifier :i Matches the expression ([a-zA-Z_$][a-zA-Z0-9_$]*) Quoted string :q Matches the expression (("[^"]*")|('[^']*')).
I think the reason it has completely different syntax is so the regex user clearly sees its non-standard and not the same as normal regex.
Which is good. All in all its a good regex engine and easy to use.
The good news:
Since Visual Studio 2013, the search uses standard .NET regular expressions:
Visual Studio uses .NET Framework regular expressions to find and replace text. For more information about .NET regular expressions, see .NET Framework Regular Expressions. Before Visual Studio 2012, Visual Studio used custom regular expression syntax in the Find and Replace windows. See Visual Studio Regular Expression Conversions for an explanation of how to convert some of the more commonly-used custom regular expression symbols to the .NET versions.
No need anymore to learn a strange regular expression flavour.