Reputation: 51
I am using IntelliJ and I would please like some help with a Regular Expression to get some results like this:
patient.setIdentificationDate(new Date()); -> {IdentificationDate} and {new Date()}
patient.setIdentificationNumber(153698); -> {IdentificationNumber} and {153698}
patient.setIdentificationSeries("33 02"); -> {IdentificationSeries} and {"33 02"}
p.s. thanks alot
Upvotes: 2
Views: 3053
Reputation: 40388
It looks like you are doing Replace in path
to modify your source code via a regular expression?
If that is the case, you can open up Replace in path
dialog (ctrl-shift-r), tick Regular Expression and enter the following:
Text to find: patient.set([A-Za-z]*)\((.*)(\);)
Replace with: {$1} and {$2}
Hope this helps.
Upvotes: 6
Reputation: 9065
this regex pattern replace will work
patient.set([^(]*)\((.*)\);
replace with
{$1} and {$2}
Upvotes: 0