Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2011, 05:30 PM   #1
drepdevel
Junior Member
drepdevel began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2011
Device: Kindle
Question A couple of questions concerning Search-and-Replace

First off, let me say that I am not particularly tech savvy, so my description may be terribly lacking in the proper terms. I apologize in advance.

Question 1: Is there any way to add more expression slots in the Search-and-Replace tab? There are only three, and I really need one or two more.

Question 2: Regex Build is not detecting this bit of code when hitting Test:

<?xml version='1.0' encoding='utf-8'?>

I am assuming it's the ? marks that are throwing it off. Is there any way to correct this or make it detectable? It's part of a long block of text that I need to get rid of in order to correct a formatting/margin error, but if it's included when putting said block in to the Regex search bar, then the entire block comes back as having 0 occurrences. In truth, the block comes up 4 times, and all other lines but this one are easily found by Regex.

Thanks for any help!
drepdevel is offline   Reply With Quote
Old 07-01-2011, 07:01 PM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
1) No. The rational is search and replace is not a replacement for an editor like Sigil. It is just there to make quick changes to commonly occurring issues within a text.

If you are using it for replace only then you can chain expression in the search field with the | character.

2) Search and replace uses regular expressions. ? is a control character. You need to escape it. \?.
user_none is offline   Reply With Quote
Advert
Old 07-01-2011, 07:02 PM   #3
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
A lot of punctuation characters have special meaning in regex, so if you want to match a real punctuation character you have to preceed it with a backslash. e.g. use \? to match a question mark.
itimpi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
search and replace - drops blanks in replace ? cybmole Conversion 10 03-13-2011 03:07 AM
Search and replace not working helmerer Conversion 4 02-25-2011 03:48 AM
new search & replace - great, but couple of suggestions cybmole Conversion 8 01-24-2011 07:01 AM
Search and replace in 0.2.0 paulpeer Sigil 7 03-13-2010 11:59 AM
Why no search and replace? charleski Sigil 10 11-24-2009 04:13 PM


All times are GMT -4. The time now is 10:20 PM.


MobileRead.com is a privately owned, operated and funded community.