作者:密斯特_张_ | 来源:互联网 | 2023-05-23 15:26
我正在使用IntelliJ,希望获得正则表达式的帮助,以获取如下结果:
patient.setIdentificationDate(new Date()); -> {IdentificationDate} and {new Date()}
patient.setIdentificationNumber(153698); -> {IdentificationNumber} and {153698}
patient.setIdentificationSeries("33 02"); -> {IdentificationSeries} and {"33 02"}
ps非常感谢
1> vikingsteve..:
看来您正在Replace in path
通过正则表达式修改源代码?
在这种情况下,您可以打开Replace in path
对话框(ctrl-shift-r),勾选“ 正则表达式”并输入以下内容:
查找文字: patient.set([A-Za-z]*)\((.*)(\);)
用。。。来代替: {$1} and {$2}
希望这可以帮助。