View Single Post
Old 08-03-2018, 02:42 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
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

That looks like it won't mess with titles that don't have the date at the start. Unless you have something like "101 Ways to Write Regex in calibre".

And use title for both the Search and destination fields.
davidfor is offline   Reply With Quote