View Single Post
Old 08-04-2018, 01:58 AM   #3
melba.d
Junior Member
melba.d began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2018
Device: paperwhite
Quote:
Originally Posted by davidfor View Post
You should be able to get away with:

Search for: (.*?)\s(.*)
Replace with: \2 \1

But, if you accidentally select a title that doesn't have the date, you will mess it up.

So, safer is:

Search for: ([\d-]+)\w(.*)
Replace with: \2 \1

Ohhhh, I see what I did wrong. I tried to match just the date but then couldn't figure out what to put in the replace field to make it work. Now I see you need to match both parts and then switch them. Thank you, this was so helpful and now I understand regex slightly better!
melba.d is offline   Reply With Quote