01-10-2011, 09:42 AM | #76 |
Junior Member
Posts: 2
Karma: 10
Join Date: Jan 2011
Device: none
|
|
05-09-2011, 01:57 AM | #77 |
Junior Member
Posts: 4
Karma: 10
Join Date: Sep 2010
Location: Yokohama, Japan
Device: Kindle 3
|
Having trouble with Regular Expressions
can anybody help me,
Im trying to get rid of "Book tittle (1975)" The book title part is no problem... but the (1975) is killing me. Maybe I'm missing something, but when I add that to the Regex, it highlights the 1975 but not the brackets. Is there anyway of getting rid of all "(1975)" without affecting other numbers throughout the book? Any help would be appreciated. |
Advert | |
|
05-09-2011, 03:03 AM | #78 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Did you escape the bracket characters by preceding them with a backslash character? Unescaped brackets are used for grouping within regex.
|
05-09-2011, 03:08 AM | #79 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Sep 2010
Location: Yokohama, Japan
Device: Kindle 3
|
Quote:
Could you please give me an example? OK I worked it out.. thanks for your help! Last edited by drone207A; 05-09-2011 at 03:38 AM. Reason: worked out problem |
|
05-09-2011, 03:27 AM | #80 |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
\(1975\)
That technique is required for any characters that have special meaning in regex syntax where you want the actual character. It is required for many of the non-alphanumeric characters (punctuation). Last edited by itimpi; 05-09-2011 at 03:34 AM. |
Advert | |
|
05-09-2011, 03:39 AM | #81 |
Junior Member
Posts: 4
Karma: 10
Join Date: Sep 2010
Location: Yokohama, Japan
Device: Kindle 3
|
|
05-10-2011, 08:42 PM | #82 |
Connoisseur
Posts: 74
Karma: 154
Join Date: Mar 2011
Location: Greater Vancouver, Canada
Device: Kindle Paperwhite 10, iPhone, iPad
|
Thanks to whomever resurrected this thread. Reading through it has been very instructional.
|
05-11-2011, 04:09 AM | #83 | |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
Moderator Notice
Just as a side note, since you mentioned resurrection: Generally, we prefer if people create new threads instead of reopening old ones. Calibre develops so fast that information in threads as old as a week may be outdated. |
|
05-17-2011, 07:54 PM | #84 |
Connoisseur
Posts: 74
Karma: 154
Join Date: Mar 2011
Location: Greater Vancouver, Canada
Device: Kindle Paperwhite 10, iPhone, iPad
|
Yup, and if this thread had been about some feature of Calibre, that's what I would have done. But I don't think regular expressions have changed all that much even in a couple of years.
Cheers. |
05-18-2011, 03:50 AM | #85 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Their practical application in Calibre has. Plus, we've had a few huge catch-all threads in the past, and they were absolutely horrendous for users to find questions that have already been answered.
|
09-27-2011, 11:27 AM | #86 |
Junior Member
Posts: 8
Karma: 10
Join Date: Sep 2011
Device: IQ pocketbook
|
New problem
Hi all. My first post was not posted in the right place.
All right, here are possible my format lists : 1) Series # 00.zip 2) Series # 00 - Title.zip 3) Series # 00 - Title [author].zip 4) Series # 00 [Author].zip 5) Title.zip 6) Title [Author].zip Without the author, I found out that this would work perfectly for 1, 2 and 5 (?P<series>.+) # (?P<series_index>\d+)( - (?P<title>.+)|) as for case 1, series and series_index are filled, AND title = Series # 00 But everytime I try to add the " [Author]", I get messed up all around. I know the parsing should go like ( \[(?P<author>.+)\[) But I can not make it conditional Can anyone help ? |
09-27-2011, 03:37 PM | #87 | |||
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
Quote:
Quote:
Quote:
Moderator Notice
In addition, you've actually managed to crosspost from this thread, which is where answers should go, since it's already active. I'm closing this thread down, so it can finally rest in peace. |
|||
Tags |
regex, regular expressions |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regular Expression Help | smartmart | Calibre | 5 | 10-17-2010 06:19 AM |
Need Help Creating a Regular Expression | Worm | Calibre | 9 | 08-18-2010 02:20 PM |
Regular Expression Help Needed | dloyer4 | Calibre | 1 | 07-25-2010 11:37 PM |
Help with the regular expression | Dysonco | Calibre | 9 | 03-22-2010 11:45 PM |
I don't know how to use wilcards and regular expression.... | superanima | Sigil | 4 | 02-21-2010 10:42 AM |