View Single Post
Old 09-14-2023, 11:50 AM   #2
kjdavies
Zealot
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 112
Karma: 53342
Join Date: Jun 2013
Device: Sony PRS-600
my calibre is tied up right now or I'd actually try this, but... a regex like this might work:

find the books to update:

Code:
tags:"~\b\d\d-\d\d\b"
search field: tags

find:
Code:
^(.*?)((\b\d\d-\d\d\b))+(.*?)$
replace:
Code:
\2,
into:
Code:
#myagetags
The comma will force an empty tag at the end, but that should fall off (empty tags disappear automatically).

This should be nondestructive to the original tags. After your satisfied it works,

search field: tags
find:
Code:
\b\d\d-\d\d\b
replace:

(i.e. replace with nothing)

should strip the age tags. Or you could go into the tag manager and manually select them, then remove from there.

Last edited by kjdavies; 09-14-2023 at 12:04 PM. Reason: improved regex, added 'remove from tags field' part
kjdavies is offline   Reply With Quote