Hi,
I just started using regular expressions in my search and replace and they are really handy.
an example:
I set my x position like this for my iPhone apps.
[lua]
puppet.x=68
[/lua]
if I have a lot of different variables set up like that, but all with different x positions. I can easily change them for my iPad version like this:
[lua]
–find this
.x=(.*)
–replace with this:
.x=$1*2+35
[/lua]
This will convert the coordinates to the correct iPad set up in my case.
Now I want to use another one in this situation, but can’t get it to work as intended:
I have the following image with width and height:
[lua]
(group,“image@2x.png”,86,184)
[/lua]
I want to add *2 to the width and height for all my images in one go.
I can use the follwoing line for that
[lua]
–find
",(.*),(.*)
–replace with
",($1)*2,($2)*2
[/lua]
but if I do this it selects the closing brace, which I do not want.
so I hoped it would select ",86,184
but it selects ",86,184)
ANy ideas how I can fix this?