View Single Post
Old 03-16-2011, 05:49 AM   #1
adept22
Junior Member
adept22 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2011
Device: Kindle
Help with a Regex Expression?

Hi, I am currently playing around with calibre and i need to try and get a regular expression to work that im having trouble with. If somebody is a guru and can help that would be great.

I have the below 2 examples of data
Darksaber
The Jedi Academy 03 - Champions of the Force

I currently have the expression
Code:
(.*?)([\d\d]+) -( .*)(?:)
In calibre when i use the \1 (Group 1) i get:
Darksaber
The jedi Academy

\2 u get:
Darksaber
03

\3 I get:
Darksaber
Champions of the force

Basically for the /1 and the /2 i dont want darksaber to appear. the \1 \2 group should only show a result when the input string has a Dash in it.

Is anybody able to help?
adept22 is offline   Reply With Quote