The above code result: DSC3.putDouble(sTT('warpPerspectiveOther'), 0undefined)
while in CS2 it was OKEY so: DSC3.putDouble(sTT('warpPerspectiveOther'), 0)

In case there is other number than 0.000000 so for ex. 1.111111 that following code or regex (/(\.0+|[^a-z\d+\.]*(\d+[1-9]+)0*)(\)) read it, is OK.
When I tried to change order, so use: /(\[^a-z\d+\.]*(\d+[1-9]+)0*|.0+)(\))/gi, '$2$3' the result was bad too.

The only thing I could do was to make two separate RegExp codes and each of them use separately with other .replace() method. This way I got:

I'm sorry I didn't respond in no time only I saw your answer. I had to do it but first wanted to finish some code related to that problem I posted here. Give me time to today evening and I'll come with my thoughts...

I'm creating now very useful code changing Action Manager code it can be very readable for people who are both experienced users of Script Listener as well as those who just started programming and are lost with that how that looks like. After I'll do separate topic with that new Script I hope most of them can now see ScriptListener codes are looking more friendly and understanadable to use it for personal further changes.

It's why I play with RegExp and can find methods it work fast, but unfortunatelly I see there are many bugs. Meantime can you tell me did you try that code of me in newest (or just) CC Photoshop edition?

To make sure I'm right I checked how it works in some JavaScript editors. Everywhere it was like in CS2, and that is correct because that | character means OR, so when one condition isn't fulfiled then it's not displayed by undefined but only the second is called and vice versa.

It's only workaround, so someone doing it must be really careful if there are some undefined words in the code he doesn't want to 'remove'

I tried all your regexp implement to my code but if I didn't miss anything any of them didn't solve the problem. Of course maybe there is some way, but from the above it seems it's a bug. My point wasn't to delete by RegExp all trailing zeros from after coma (1.000000 -> 1, 5.010000 -> 5.01, 0.100400 -> 0.1004). Like you see when there are only zeros after coma then only a digit without following coma stays as result. When there are some number over zero after coma then there stays leading number from before coma, a coma and all numbers from after coma (without last zeros). It's what my code was designed for. If there is: