Mask to insert space counting from end of filename

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Stefan2
Power Member
Power Member
Posts: 4159
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Mask to insert space counting from end of filename

Post by *Stefan2 »

Thank you!

But I wanted an screenshot of the whole post, as you said there is nothing else, so we can see what you see.


Your posted screenshot shows that your browser doesn't show all possible signs, perhaps a different code page issue, I doesn't know.
I have code page setting "Unicode".
If you want, try in your browser menu "View > Text encoding" and set it to Unicode.



What you doesn't see correctly (according to your screenshot) is just a try to show the option line of the MRT (MultiRenametool).
As the bold and blue colored part try to describe that you should un-check [_]E .... and check [x]RegEx, then my above suggestion may work for you too.


That show use that it is not an good idea to work with such unicode sign as some browser (or user setting) may not display it correctly,
let me please ask to apologize for my bad idea, that worked out wrong.


Here is the old way of providing the solution:

Search for: ^(.+?)(\d\d\d[\s!]*)$
Replace with: $1 $2
[_][E]
[x]RegEx
Disable Extension and enable RegEx



 
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Mask to insert space counting from end of filename

Post by *Usher »

2Stefan2
The only problem seems to be with caret (^) character for uppercase, which you should show without underlining. Some fonts may have smaller characters for checkboxes, but they still seem to be more readable than my attempt using US-ASCII characters only, with square brackets instead of rectangles as input/check boxes:

Code: Select all

Search for:   [^(.+?)(\d\d\d[\s!]*)$             ]
Replace with: [$1 $2                             ]
[ ] ^   [ ] 1x   [ ] [E]   [v] RegEx   [ ] Subst.
As you can see, [E] is somehow unclear, and it's not easy to guess which characters (brackets and spaces) are part of expressions.
And now the exact screenshot with visible shortcut/navigation Alt+keys: https://imgur.com/a/znqeruT

One more thing to explain for @spikey:
@Stefan2 did use some compound regular expression in "Search for" field. Specific parts of this expressions (subexpressions) are enclosed in parentheses (round brackets). You don't need to paste those subexpressions to "Replace with" field, it's enough to call them using number of their location. It's explained in TC Help for regular expressions:
TC Help wrote:Subexpressions for search+replace

Text parts in round brackets are taken as subexpressions. Up to 32 subexpressions are supported now.
Example: To swap the title and interpret in the file name of an mp3 file, when they are separated by a dash (Title - Interpret.mp3), use the following options:
Search for: (.*) - (.*)\.mp3
Replace by: $2 - $1.mp3
Here $1 means the text in the first round bracket, and $2 the text in the second round bracket.
Andrzej P. Wozniak
Polish subforum moderator
Post Reply