Thread: Regex examples
View Single Post
Old 02-28-2014, 09:00 PM   #299
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
So I did a practical try with a book including 89 quotes. It worked very well.

On the first run, it produced 87 opening tags and 89 closing tags. This discrepancy triggered a reporting mistake. It was due to the fact that two times I had NOT a plain <p> style before the quote, so, of course, these two times the regex did not create any tag.

It's better to prevent the problem than trying to solve it once it happened. That's why, before performing these two separate regexes, it would have been better for me to ask Sigil to number the occurrences for each of them. If the figures are equal (say 89 all): go for it. If not, look for the explanation.

Last edited by roger64; 02-28-2014 at 09:15 PM.
roger64 is offline   Reply With Quote