Add hyphen and a Character After Number only not before

A swapping-ground for Regular Expression syntax

Add hyphen and a Character After Number only not before

Postby Mahmoud_Arslan » Mon Apr 25, 2022 1:59 am

hello
I benefited and learned a lot about program's tricks from Bulk Rename Utility site
I tried several attempts and got to this result the series name - S01E - 01 - the site name, but it does not satisfy me
I want to reach this style the series name - S01E01 - the site name, and i want to learn add dots between words and Capitalize the first letter of each word

Title : The.Series.Name - S01E
The Auto Numbring : 01
The character after number : <Space><hyphen><Space><The.Series.Name>

The last result : The.Series.Name - S01E01 - The.Series.Name
Mahmoud_Arslan
 
Posts: 1
Joined: Mon Apr 25, 2022 12:49 am

Re: Add hyphen and a Character After Number only not before

Postby Luuk » Fri Apr 29, 2022 11:12 pm

To conduct renames like?...
the series name - S01E - 01 - the site name ===> The.Series.Name - S01E01 - The.Site.Name

The RegEx(1) needs a checkmark in "v2" so that (?X) can say... "Next Match" or "Next Replace".
So with the checkmark inside for "v2", then the "Match" and "Replace" can look something like...

^(.)(?X) +(.)/g(?X)\.-\.(S\d+E)\.-\.(\d+)\.-\.
\U$1(?X).\U$1(?X) - $1$2 -\x20

The 1st Match(?X)Replace upper-cases the very first character.
The 2nd Match(?X)Replace upper-cases every character after a space, and converts "spaces" ===> "."
The 3nd Match(?X)Replace just converts ".-.S01E.-.01.-." ===> " - S01E01 - "

If needing help to select the files, Filters(12) needs a "Mask" like... .+ - S\d+E - \d+ - .+ then to put a checkmark underneath for "RegEx".
Luuk
 
Posts: 691
Joined: Fri Feb 21, 2020 10:58 pm


Return to Regular Expressions