![]() |
#1 |
Member
![]() Posts: 21
Karma: 12
Join Date: Sep 2007
Device: Irex ILiad
|
"invalid group reference" error on search/replace
Using the most recent version of calibre, whenever I would like to back reference to a search pattern match using "\1" in the "replace with" field the "invalid group reference" error is displayed
Any idea how to solve it? THX in advance |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,891
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
are you in REGEX mode (on the right)?
did you set a Capture group eg (\d+) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 21
Karma: 12
Join Date: Sep 2007
Device: Irex ILiad
|
Yes I am in Regex mode.
THX - setting the search pattern in brackets removed the error, but unfortnately I have not found a way to do the job I like to do. I have some books with title fields containing "author, name - title" while the author-field is empty. So I tried to search for (.* - ) in the title field and to set \1 in the replace line and set ther target field to "author", so that this part is moved - but this does not work. THX |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,327
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The replacement string replaces the matched portion of the searched-for string, not the whole string being scanned. Because of this your pattern must match everything you want replaced. For example, include a .* at the end to match.
This screen capture shows what I mean. |
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 21
Karma: 12
Join Date: Sep 2007
Device: Irex ILiad
|
![]()
THX chaley
worked perfectly! ![]() |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Choice lists for "Search" and "Replace" | korben | Editor | 7 | 07-18-2014 04:03 PM |
Problems with news and the Sony PRS-T1 "Invalid Page" error | MRi | Calibre | 8 | 11-13-2011 07:39 AM |
PRS+ "Invalid Type" error - Sony 505 | vans | Sony Reader Dev Corner | 19 | 08-05-2011 03:05 PM |
Error help: "Invalid input object: NoneType" | MichaelGray | ePub | 1 | 02-14-2010 09:16 AM |
Error message : "Invalid Format" " Do you want to format your internal memory" | narbeauchamp | Sony Reader | 11 | 07-22-2009 12:39 PM |