Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 05-14-2020, 08:57 PM   #1
tonibat
Junior Member
tonibat began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: none
Problem with reg expression !

Have got quite a large collection of books in the format:
"[Author1, Author2...] Title - Subtitle"

It seems that the reg expressions interpreter won't allow this. No way to get it to accept the '[' and ']' as valid delimiters. Any clue to a solution ?

Thanks
tonibat is offline   Reply With Quote
Old 05-14-2020, 09:59 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Escape them with a preceding backslash
kovidgoyal is offline   Reply With Quote
Advert
Old 05-15-2020, 08:51 AM   #3
tonibat
Junior Member
tonibat began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: none
Doesn't work for me.
I have my files in format: [<author>] <title>.ext, for example:
[John Doe] Mybook.pdf

and I've tried several patterns:

\[(?P<author>[^_]+)\]\s(?P<title>.+)

\[<author>\]\s(?P<title>.+)

as well as some smpler ones:

\[<author>\]\s<title>

None of them works. All result in
Title: [John Doe] Mybook
Author: Unknown
So, the author is not parsed, it is all put into the title.

I have Calibre 1.25 in Linux
tonibat is offline   Reply With Quote
Old 05-15-2020, 09:20 AM   #4
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
Quote:
Originally Posted by tonibat View Post
Doesn't work for me.
I have my files in format: [<author>] <title>.ext, for example:
[John Doe] Mybook.pdf

and I've tried several patterns:

\[(?P<author>[^_]+)\]\s(?P<title>.+)

\[<author>\]\s(?P<title>.+)

as well as some smpler ones:

\[<author>\]\s<title>

None of them works. All result in
Title: [John Doe] Mybook
Author: Unknown
So, the author is not parsed, it is all put into the title.

I have Calibre 1.25 in Linux
Really? Calibre 1.25? I would strongly recommend upgrading.

I don't have a version of calibre that old to test with. But, using the test in the Adding books page of the preferences, the first one above works correctly.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Have a Regular Expression problem with Author Field searcygr Library Management 2 09-21-2018 10:33 AM
Help with Reg-ex of Course pappabees61 Library Management 1 09-23-2017 09:34 PM
Reg-ex help...? ElMiko Sigil 11 12-06-2011 12:41 AM
Adobe Reg problem on PE Gremalkin enTourage eDGe 5 09-02-2011 03:01 PM
Reg expression for importing Debby Library Management 2 02-17-2011 11:20 AM


All times are GMT -4. The time now is 12:41 AM.


MobileRead.com is a privately owned, operated and funded community.