View Single Post
Old 08-15-2011, 01:47 PM   #5
mightymouse2045
Enthusiast
mightymouse2045 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: May 2011
Device: xoom
Quote:
Originally Posted by Manichean View Post
Ah. That's somewhat easier, but basically would require the user to input the same information he would when typing the regex himself, so, apart from not having to learn the syntax, there wouldn't be much improvement. This may be of interest, by the way.

Since this is basically a plugin request, I'm moving it to the appropriate forum.
Thanks for moving it to the appropriate forum

Yes there are tools out there that help you build a regex expression, and I have looked at kodos and some others but it would nice to do it within Calibre, because it is a pain reordering the fields and getting the syntax right, with the brackets in place, ensuring it's still flexible etc.

Like this one I use for the main part:

Code:
^(?P<author>[^-]+)(\s*-\s*(\[?(?P<series>[^-0-9]+)\s*(?P<series_index>[0-9.]+)?]?)?)?.*?-\s*(?P<title>[^\]{[()]+\w)
Matches a fair bit, but if i want to reorder the fields it escapes me what I should move where...

But I will play around with those builders anyways and see if they can assist for now Cheers
mightymouse2045 is offline   Reply With Quote