I vant to reverse order of words

A swapping-ground for Regular Expression syntax

I vant to reverse order of words

Postby lemarec » Fri Dec 30, 2016 5:41 pm

Hello
I want to change order from words in a file name with a special char separator

exemples :
Abzalon - Bordage, Pierre.epub -> Bordage, Pierre - Abzalon.epub ("-" is the separator)

Thanks
lemarec
 
Posts: 3
Joined: Wed Dec 30, 2015 11:16 am

Re: I vant to reverse order of words

Postby therube » Fri Dec 30, 2016 6:07 pm

If the separator is actually " - " (with a space before & after)...

1:RegEx

Code: Select all
Match:  (.*) - (.*)
Replace:  \2 - \1
therube
 
Posts: 316
Joined: Mon Jan 18, 2016 6:23 pm

Re: I vant to reverse order of words

Postby lemarec » Fri Dec 30, 2016 7:47 pm

Thanks, it work well
lemarec
 
Posts: 3
Joined: Wed Dec 30, 2015 11:16 am


Return to Regular Expressions