View Single Post
Old 07-14-2012, 01:57 PM   #1
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Question Simple Search & Replace not working!?

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
MontyJ is offline   Reply With Quote