by RegexNinja » Sun Mar 08, 2020 9:28 am
Hi
To replace Space(AnyLowerCase) with Space(UpperCase) beginning at the filename's 40th-character:
BRU javascript:
newName=name.substr(0,40)+name.substr(40).replace(/( [a-z])/g, function(up){return up.toUpperCase()})
BRC commandline:
brc32 /MinLen:41 /Insert:"|:40" /ReplaceCI:" |: | " /CutFirstN:39 /ChangeCase:T /PasteAtStart /ReplaceCI:"|:" /TidyDS /Execute
Does the same thing in a different way, in this order:
1. Insert | as the 40th-char
2. IF | was inserted after Space: Add another space after |
3. Cut the 1st 39-chars
4. Apply Title case-conversion (against the remaining 40th-char onward)
5. Paste the 1st 39-chars back into filename (at start)
6. Remove the | character
7. Convert double-spaces -> single-space (possibly created during step 2)