![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2024
Device: kindle
|
looking for the correct regex
Hi,
During the last years, I've been storing all my books using this simple format: El tutorial de python - Guido van rossum (2017).pdf Zed A. Shaw - Learn Python The Hard Way (2011).epub I'm lookinf for a regex template to be able to capture the metadata correctly. I've tried multiple kind of combinations, but I'm not being able to capture the year. One of the last examples I tried: (?P<author>[^_-]+) - (?P<title>[^_].+) (?P<published>[^_]).+? No matter the way I trie.. i never get the year. Could yopu please help me with this? Thanks in advance! |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2024
Device: kindle
|
Anyone?
Just some help, please ![]() |
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,164
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
|
You forgot the parentheses:
Code:
(?P<author>[^_-]+) - (?P<title>[^_].+) \((?P<published>.+)\) |
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Jun 2024
Device: kindle
|
Quote:
thanks a lot for your answer. I've just tried the example you propposed, but it doesn't seem to work. The problem is that the year is not being detected. Do you have any other seugestion for me? Thanks a lot!! |
|
![]() |
![]() |
![]() |
Tags |
calibre, metadata, regex |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex in Regex function mode | lindlind | Editor | 5 | 03-22-2024 03:41 AM |
pdf regex question - regex that wraps to a new line | flyash | Conversion | 1 | 09-05-2021 09:00 AM |
Predefined regex for Regex-function | sherman | Editor | 3 | 01-19-2020 05:32 AM |
RegEx to correct Single quote to Double? | phossler | Editor | 3 | 02-22-2015 01:48 PM |
Is this e-pub correct? | silviolorusso | ePub | 12 | 06-08-2011 03:52 PM |