-1

I want to substitute lot's of different lines in a decompiled project:

get_Method();
set_Method(value);

This is how the code i'm working on refers to methods with get and set attributes So I should change all of this call to

Method;
Method = value;

But it's impossible to change manually every line of this kind... I think it's likely to change them all at once using the regular expressions, but I really don't know how to do it, I tried a lot and i'm just messing things up

Can someone give me an example of regular expression that can help me change every .get_Method() into .Method and every set_Method( into .Method = (?

FenriX
  • 13
  • 2

1 Answers1

0

I think Replacing \.get_(.*?)\(\) with $1 and replacing \.set_(.*?)\((.*?)\) with $1 = $2 is what you need.

Using Regular Expressions in Visual Studio

MohaMad
  • 2,575
  • 2
  • 14
  • 26
  • with a dot right before the group reference it seems to work! I never properly understood regex, and it's a huge downside since is really usefull, this expressions anyway seems to work properly! Thanks! – FenriX Mar 04 '17 at 17:46
  • there was a few information about inputs and outputs in your question. It's good that worked, and It's better trying to use and become familiar with Regex. @FenriX – MohaMad Mar 04 '17 at 17:52