Reputation: 98
I'm trying to RegEx replace in Notepad++ and having issues.
Essentially I'm coding a script and have added an extra variable to a function which appears hundreds of time in my code.
So it was:
MouseClick(442,421)
Now I added a third variable for mouseclick delay so it will be
MouseClick(442,421,4500)
4.5 Sec is default delay
At the moment it won't work as a third variable isnt declared so I essentially want to use RegEx to find all my mouseclicks and add the default value of 4500 to the end, is it possible or is RegEx not the answer?
I'm trying to find: MouseClick(*,*)
And replace with: MouseClick(*,*,4500)
Also will the values be the same when replacing with a wildcard?
Thanks.
Upvotes: 0
Views: 2384
Reputation: 208545
With the Regular Expression search mode selected, replace MouseClick\((.*),(.*)\)
with MouseClick(\1,\2,4500)
:
Upvotes: 1
Reputation: 1384
You can't replace with a wild card. You have to "capture" the values that were there before. You probably want to find
MouseClick\((.*),(.*)\)
and replace it with
MouseClick(\1,\2,4500)
Comment if you have any questions.
Upvotes: 3