Move A matching sequence to the beginning of file name

A swapping-ground for Regular Expression syntax

Move A matching sequence to the beginning of file name

Postby Nikhil1912 » Wed Dec 07, 2016 2:29 pm



1st Filename = "1 NF - DBMS - part-9 - YouTube.mp4"
2nd Filename = "ACID Properties DBMS - part-18 - YouTube.mp4"

I Want to move DBMS next all to beginning and a total of 27 such filenames with anything before "- DBMS -"
Nikhil1912
 
Posts: 1
Joined: Wed Dec 07, 2016 2:21 pm

Re: Move A matching sequence to the beginning of file name

Postby KenP » Wed Dec 07, 2016 3:04 pm

If I'm understanding correctly you want to move the DBMS part to the start of the file name, if that's correct this will work.

RegEx (1)
Match: (.*)(DBMS -)(.*)
Replace: \2 \1\3

If the result is not exactly what you're looking for please post a couple of examples of how you would like them to look after the name change.
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am


Return to Regular Expressions


cron