String ex. something.text = obj.something I am looking for a REGEXP that will swap the first value before the ‘=’ with the second resulting in: obj.something = something.text
I understand most Regular Expressions are quite universal but to be specific I plan to use this statement semi frequently in Visual Studio.
Thank you for any help.
It’s a good thing you specified the flavor. Most regex flavors are similar to each other, but not Visual Studio’s. Its syntax is very, very different from most other flavors. Try this:
search:
{:w\.something} = {something\.:w}replace
\2 = \1{...}forms a “tagged expression” (known to the rest of the world as a “capturing group”):wmatches one or more lettersHere’s a complete reference.