Move 4-digit year to beginning of file

A swapping-ground for Regular Expression syntax

Move 4-digit year to beginning of file

Postby jettatdi » Sat Jun 17, 2017 7:17 pm

I would like to change multiple file names so that a four digit year is at the beginning of every file name

Escape from Alcatraz 1979 1080p
The Texas Chainsaw Massacre The Beginning 2006 1080p

Change both to:

1979 Escape from Alcatraz 1080p
2006 The Texas Chainsaw Massacre The Beginning 1080p

Thank you
jettatdi
 
Posts: 2
Joined: Sat Jun 17, 2017 7:12 pm

Re: Move 4-digit year to beginning of file

Postby KenP » Sat Jun 17, 2017 7:36 pm

RegEx (1)
Match: ^(.*\s)(\d{4}\s)(.*)$
Replace: \2\1\3
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Move 4-digit year to beginning of file

Postby jettatdi » Sun Jun 18, 2017 1:54 am

Awesome!

Thank you!

I tried several different methods and none worked. I appreciate it!
jettatdi
 
Posts: 2
Joined: Sat Jun 17, 2017 7:12 pm

Re: Move 4-digit year to beginning of file

Postby KenP » Sun Jun 18, 2017 8:48 am

You're welcome :wink:
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am


Return to Regular Expressions