![]() | ||||
Copy std::string title("Great!"); and paste it in Search for field in Regent. Enter or paste System::String^ title = gcnew System::String("Great!"); in Replace with field. Press Make regular expression. Content for Regular expression and Format string appear sharing common elements and escaping special regular expression language symbols:
To make regular expression match all similar fragments select title and click Apply (Regex suggestion of C/C++ identifier is exactly what we need here):
Select "Great!" and click Apply (Regex suggestion of Quoted string is exactly what we need again):
That's all you need to know about regular expressions :) Copy resulting std{\:\:}string{ :i}{\(:q\);} and System\1String^\2 = gcnew System::String\3 directly into Visual Studio's Find and Replace dialog using VS button, select Regular expressions usage and Replace them All:
Download Regent - Automatically generate regular expressions from text example.