View Single Post
Old 11-06-2019, 08:24 PM   #1
anoukaimee
Enthusiast
anoukaimee began at the beginning.
 
anoukaimee's Avatar
 
Posts: 30
Karma: 10
Join Date: Aug 2017
Location: USA
Device: Kobo Clara, Pixel 6 (Moon Reader/Calibre Companion), Amazon Fire 10
Exclamation cannot figure out, please help: bulk metadata swap numeric mo/yr in title w/ regex

I apologize in advance because I think this is a super simple question, but I've been searching for hours and, for the life of me, I cannot seem to figure it out.

I have many periodicals for which I'd like to standardize the date in the title. I already went through and "manually" changed the months from alpha to numeric (e.g., "Jan" to "01"). I now realize that I'd like to also have the year first, followed by the month.

So, for instance, I have a bunch of Gardeners' World Magazines, that are currently inputted as:

Gardeners' World Magazine, [MONTH] [4 DIGIT YEAR]
e.g., "Gardeners' World Magazine, 01 2011" (that is, Jan 2011)

I would like to format them as:

Gardeners' World Magazine, [4 DIGIT YEAR]/[MONTH]
e.g., "Gardeners' World Magazine, 2011/01"

BUT I can't figure d**n regex out (even though I find it totally fascinating), specifically how to replace a pattern. I figured out that "\d{2} \d{4}" expresses the date as it is now formatted, which is great, BUT I can't figure out how to transform it to the desired pattern. Please see pic for clarification.

Thanks!
Attached Thumbnails
Click image for larger version

Name:	calibre search replace metadata.PNG
Views:	683
Size:	86.7 KB
ID:	174759  
anoukaimee is offline   Reply With Quote