Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-16-2012, 06:38 PM   #1
unrulyguides
Member
unrulyguides began at the beginning.
 
Posts: 10
Karma: 12
Join Date: May 2011
Device: Kindle
Find Replace

My HTML is coming in like this:

<p>
If there was a stranger he was nearly sure to be suspicious, and when he got his breath again he would ask her what it meant. And she always told him.
He was never expecting this but thought he would catch her; so when she told him, he was the one that looked ashamed, whereas he had thought it was
going to be she.
</p>
<strong>
<br clear="ALL"/>
</strong>
<h1>
CHAPTER II
</h1>

I need to remove the br clear="ALL", but I cannot do a find replace because the line is broken up and SIGIL won't automatically correct this (sometimes)

How do I write this in the Find/Replace to:

Find:

<strong>
<br clear="ALL"/>
</strong>

Replace with : nothing


I am using 5.2, Mac OS 7

(BTW, this worked fine in 4.2, but since 4.9 I can't get it to correct)

Thanks,
unrulyguides is offline   Reply With Quote
Old 02-16-2012, 06:54 PM   #2
davidfor
Wizard
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 4,945
Karma: 4798550
Join Date: Jul 2011
Location: Australia
Device: Kobo Touch, Kobo Glo
A regex search for the following should work:

<strong>\n<br clear="ALL"/>\n</strong>\n

If there are any spaces on the end of the lines, you will need to add them in.
davidfor is online now   Reply With Quote
Old 02-16-2012, 07:01 PM   #3
GeneS
eBook Enthusiast
GeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enoughGeneS will become famous soon enough
 
GeneS's Avatar
 
Posts: 118
Karma: 726
Join Date: Dec 2007
Location: US
Device: Sony PRS-350, Astak PocketPro, iPhone, Asus eee Pad Transformer
I don't know if Mac vs. PC makes any difference, but I would use:

Find:
<strong>\s+<br clear="ALL"/>\s+</strong>

Replace: nothing

Set to: Regex
GeneS is offline   Reply With Quote
Old 02-16-2012, 07:06 PM   #4
unrulyguides
Member
unrulyguides began at the beginning.
 
Posts: 10
Karma: 12
Join Date: May 2011
Device: Kindle
Brilliant! GeneS worked perfectly -- my customers will be happy. Thank you thank you!
unrulyguides is offline   Reply With Quote
Old 02-17-2012, 04:43 PM   #5
mmat1
Det
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 938
Karma: 1104656
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Find linebreaks in normal mode

I noticed that regex is actually not needed to find some static text with linebreaks

- Open the Search/Replace Box
- Then copy/paste the text into the "Find"-field (this will include all line-breaks, but they aren't visible)

Sigil will find the text in "normal"-mode and replace it if neccessary.

Marking the text first and then open the s/r box with ctrl+f will not work.

I don't know if this will work on other os than xp as well, but it's a funny thing
mmat1 is offline   Reply With Quote
Old 02-17-2012, 08:38 PM   #6
yekim54
What the Dog Saw
yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.yekim54 ought to be getting tired of karma fortunes by now.
 
yekim54's Avatar
 
Posts: 305
Karma: 981684
Join Date: Jul 2008
Location: Dunn Loring
Device: Sony PRS-505, PRS-650, Asus TF101
Quote:
Originally Posted by mmat1 View Post
I noticed that regex is actually not needed to find some static text with linebreaks
Thanks for the tip!
yekim54 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RegEx find and replace iblesq Sigil 1 01-10-2011 09:26 PM
Find / replace bremler Sigil 6 12-17-2010 03:26 PM
find and replace, epub ampsonic Reading and Management 3 03-02-2010 03:20 AM
Crashes on find / replace all mr ploppy Sigil 1 02-03-2010 12:35 PM
Using Find/Replace with BD Otter Sony Reader 7 02-28-2009 01:49 PM


All times are GMT -4. The time now is 03:10 AM.


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