|
|
#1 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2026
Device: none
|
Fixing Titles using regular expression
Hello all,
I'm trying to figure how to trim down titles using regular expressions. For example, the title would be like this "OSS 123 - this is example" and I want to trim down to "OSS 124", so how I delete "this is example"? Other books like this RAID 345 - this is other example OSS 643 - this is different example GI: This is solider Okay, I know it sounds silly, but I want to do batch to trim down to RAID 345, OSS 643 and GI. How do I do in regular expression? Thanks! THartmann9374 |
|
|
|
|
|
#2 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,482
Karma: 31000706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Trim where - in the Book itself, or in the Library metadata?
BR |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2026
Device: none
|
|
|
|
|
|
|
#4 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,596
Karma: 62544528
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice
Moved, this is a Metadata Editor Q, not a Editor Q. |
|
|
|
|
|
#5 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,596
Karma: 62544528
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Here you go
looks for Caps, a space followed by digits followed by a space dash /anything/ only saves the part up to the dash |
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2026
Device: none
|
Quote:
Thanks! THartmann9374 |
|
|
|
|
|
|
#7 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,596
Karma: 62544528
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Grab a REGEDIT cheat sheet (and a CSS one while you are at it I like cheatography ones. a period is a REGEDIT special character You saw .+? all 3 have special meaning Calibre and Sigil use PCRE flavor, so not all on the sheet apply special characters need to be 'escaped', thus \. \s is any kind of space \d any digit |
|
|
|
|
|
#8 | |
|
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Mar 2026
Device: none
|
Quote:
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regular Expression help: complicated remaming of titles | Ersatzreifen | Library Management | 1 | 03-30-2016 10:37 AM |
| More than 3 regular expression? | james968 | Conversion | 1 | 04-04-2012 05:39 AM |
| Regular Expression Help | iKarampa | Calibre | 13 | 12-15-2010 07:17 AM |
| Regular expression help | krendk | Calibre | 4 | 12-04-2010 04:32 PM |
| Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 10:45 PM |