![]() |
#1 |
Addict
![]() Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
![]()
Hola to all from HOT Mexico!!
Been using Calibre heavily and have started getting more into search & replace using regular expressions. So far have been able to figure out everything except this one! Everything indicates it should work, but it doesn't, so thinking some really noob mistake on settings is the cause but I sure can't figure out what it could be. I am simply trying to delete the character " &" and everything after it in the Author field. Example: "Name ABC & Name DEF" should read "Name ABC" Note: This includes one space before the "&". Easy enough, right? I just use the RE: "\s* & .*" (without the quote marks) I have saved this RE in the Load Search/Replace section, along with others that work just fine. When I apply the RE to the Author(s) field, it appears to work, but nothing changes; the contents of the Authors field with the offending "&" are not altered after selecting ALL entries and hitting OK in the Search/Replace window! So, I use the "Test" field and copy/paste an exact Author field with the "&" in it and it correctly deletes " &" and everything after it, indicating the RE is valid and doing (in test mode) what it is supposed to do! But, on actual data, nothing happens. I am stumped! ![]() I have played with various other settings, but so far no go. Its gotta be so obvious it is staring me in the face! Point me in the right direction!! ![]() Thx - MontyJ Last edited by MontyJ; 07-14-2012 at 02:08 PM. Reason: Clarify with note |
![]() |
![]() |
![]() |
#2 | |
Addict
![]() Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
|
Quote:
The "&" character is not really a "metacharacter", but Calibre uses it to determine "multiple Authors" when determining a "split". So weird things were happening when trying to do simply things, such as a normal replace of it! Bottom line it won't work because there does not seem to be any way to code (RE) around it! Anyway, the solution is to use that exact RE I put in the previous post, but then: - Set the "Search Field" as "Author_Sort", NOT "Author"!! - Then set the "Destination Field" to "Author" This will then run the RE normally and the results are what I wanted! Hope it helps someone... MontyJ Last edited by MontyJ; 07-14-2012 at 07:14 PM. Reason: sp |
|
![]() |
![]() |
Advert | |
|
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with a search & replace | mmholt | Library Management | 11 | 10-21-2011 06:49 PM |
Search & Replace :help: | krussell | Calibre | 3 | 08-02-2011 04:45 PM |
Search and replace not working | helmerer | Conversion | 4 | 02-25-2011 03:48 AM |
Using the Search & Replace feature | Manichean | Conversion | 0 | 01-26-2011 05:26 PM |
Search & Replace | Pat Nickholds | Sigil | 2 | 10-21-2010 11:18 PM |