You have given it time to work haven't you?
humax /mnt/hd2/mod/webif/plugin/sweeper # diff macro.js~ macro.js
--- macro.js~
+++ macro.js
@@ -41,6 +41,23 @@
"cmd": "settitle",
"arg": "%orig%regsub,New:\\s*,,"
}
+ },
+ {
+ "raw": "filename New_* action {renamefile {%orig%regsub,New_\\s*,,}}",
+ "name": "Remove New_ prefix.",
+ "type": "global",
+ "enabled": "1",
+ "criteria": [
+ {
+ "negate": 0,
+ "cmd": "filename",
+ "arg": "New_*"
+ }
+ ],
+ "action": {
+ "cmd": "renamefile",
+ "arg": "%orig%regsub,New_\\s*,,"
+ }
}
]
},
The escape character "\" has to be itself escaped in the shell commands. The shell will interpret the first "\" as an indicator that the next character must be treated differently, so if you were to only put the one "\" it would disappear in what got passed to the output (and probably wreck something else too). Thus "\\" says to the shell "this represents a single \ in the string", and just "\" gets passed to the output.But I do notice that your code includes \\s* not just \s*
Presumably it makes a difference?