I have about 100 lines that look like the below:
assertEquals(results.get(0).getID(),1);
They all start with assertEquals and contain two arguments. Im looking for a way to use find and replace all to swap the arguments of all these lines.
Thanks
use the following regexp to find:
assertEquals\((.*),(.*)\);
and this replacement value:
assertEquals(\2,\1);
The regexp means "assertEquals( followed by a first group of chars followed by a comma followed by a second group of chars followed by );".
The replacement value means "assertEquals( followed by the second group of chars found followed by a comma followed by the first group of chars found followed by );".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With