by RegexNinja » Sun Apr 19, 2020 12:56 am
Insofar as I know, BRU's regex cant match unicodes, including arabic like: [\u0600-\u06ff].
Just for fun, I did try the \x06[\x00-\xff] 'equivalents', but had no success in matching them.
As ironic as it sounds, you can reverse-match against them with [\x00-\xff].
So for the example given (no arabics), you could use:
#12Filters:
Mask=^[\x00-\xff]*$
RegEx=Checked
F5/Refresh to apply the filter
#5Remove:
D/S=Checked
#1Regex Match/Replace:
(?i)([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*([- _+()?a-z0-9]*)[^- _+()?a-z0-9]*(.*)
\1\2\3\4\5\6\7\8\9
Regex Notes:
The regex is just ([- _+()?a-z0-9]*)[^- _+()?a-z0-9]* repeated 7-times, with a final (.*) to match everything-else.
So it removes a max of 8 'special-character-strings' in filename, preseving only: Digits, Alphas, and: ?_-+()
It cant touch filenames with arabics, because #12's mask filters them away.
Results:
0001 avenger _ #Last-Movie = ( & ^^^ ??? )@@+$exstra ----> 0001 avenger _ Last-Movie ( ??? )+exstra
Begin_Text #[]{};$,=@ Middle-Text ^]{~%!, (End-Text) ------> Begin_Text Middle-Text (End-Text)
Cheers