View Single Post
Old 04-26-2014, 10:56 AM  
FlashFXP Developer
bigstar's Avatar
Join Date: Oct 2001
Posts: 8,012

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.

/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
/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.
bigstar is offline