你好我想replace这个文本:
test.myfonction(arg1, arg2) test2.myfonction(arg1, arg2) test3.myfonction(arg1, arg2)
这样:
myfonction2(test, arg1, arg2) myfonction2(test2, arg1, arg2) myfonction2(test3, arg1, arg2)
为此,我使用正则expression式在记事本+ + +,findSomething.mafonction(arg1,arg2)我使用这个:
(*).myfonction(
但如何获得testing,testing或testing3?
myfonction2(test
那么,你需要捕捉字符串之前.
,函数名称和参数:
(\w+)\.(\w+)\(([^\)]+)\)
演示。
现在你有三个组:
你可以用它来替换你想要的输出的字符串:
\2\(\1, \3\)