I have successfully added $replacerx()
This replace function is rx specific so the rx: prefix from the pattern must be omitted.
An example of using $replacerx() with /ren and we /enqueue the /ren operation so we can review the operation before executing it.
Code:
/enqueue /ren "%p%f" "%p$replacerx("%f", "^([0-9]+[\s][-]) (.*)\.(.*)$","\2.\3")"
Input: C:\path\3938 - How to win.txt
Output: C:\path\How to win.txt
In the queue window the operation would appear as
Code:
/ren "C:\path\3938 - How to win.txt" "C:\path\How to win.txt"
Also if the pattern fails to match or the result is an empty string then the original input value returned.
I have some additional testing to do before I make these changes available.
As expected, the more testing I do the more problems I find.