#1 2021-08-18 13:04

jimbob80
Member
Registered: 2021-08-18
Posts: 1

How to add a space between a character and number?

I have hundreds of files which look similar to the example below:

Weather2 Grange.zip

Needing to bulk rename them all so they look like this: Weather 2 Grange.zip

The files are all different character lengths, meaning words are different, however the numbers are always positioned immediately after a letter and without a space.

Any ideas how to do this?

Last edited by jimbob80 (2021-08-18 13:09)

Offline

#2 2021-08-18 16:34

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: How to add a space between a character and number?

Hi,

Try this RegEx rule:

1) Regular Expressions: Replace expression "([A-Za-z]+)(\d+)" with "$1 $2" (skip extension)

From:

Weather2 Grange.zip
Weather12.zip
Word Weather0123456789 Grange.zip

To:

Weather 2 Grange.zip
Weather 12.zip
Word Weather 123456789 Grange.zip


If you have any other symbol in word+digit(s), just add it inside [A-Za-z] part like [A-Za-z#$] etc.


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#3 2021-08-18 16:40

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: How to add a space between a character and number?

Hi and welcome.


FROM:
Weather2 Grange.ext
Just3 a Test4.ext
Another-5.ext
Another_6.ext
Another.7 Check8.ext

TO:
Weather 2 Grange.ext
Just 3 a Test 4.ext
Another-5.ext
Another_6.ext
Another.7 Check 8.ext

Wanted:
separate char and following digit by an space

Use:
https://www.den4b.com/wiki/ReNamer:Rules:RegEx

Rule: Regular Expressions
Expression: ([A-Z])(\d+)
Replace: $1 $2
[_] Case-sensitive
[x] Skip extension




HTH? big_smile


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB