Hi all,
I have a collection of files that at some point in their journeys had their names URL-encoded. That is, there are a number of occurrences of percent signs followed by two hex characters. I want to universally strip these out of the file and folder names, without putting anything in their place.
For example:
Original: Coke%2BPantry%2BFeb%2B6%2B2013.pptx
New: CokePantryFeb62013.pptx
The regex match pattern is simple: %[0-9A-F]{2}
There can be zero or more matches in a file or folder name and the matches can occur anywhere in the middle of the name and could also be adjacent to one another.
The problem I am running into is that BRU is not allowing me to enter this into the RegEx(1) "Match" and then leave the "Replace" empty, effectively saying, "remove every match from the name."
I have even tried entering an unused character, the caret (^) into the replace field with the notion of doing a second sweep to using Repl.(3) to strip out the caret characters, but this results in the ENTIRE NAME before replaced by a caret character if there is any match in the name.
I'm banging my head into a wall with this. I use regular expressions constantly in Javascript and PHP programming. I understand them. I also LOVE BRU and use it constantly. I've just never had to use it for regular expressions before right now.
I'm hoping this is something obvious that I am overlooking and someone can point out the problem. I'm not enjoying the notion of writing a file/folder renaming utility in PHP to do what I think BRU should be able to do for me.
Thoughts?