View Single Post
Old 12-15-2013, 09:46 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by MizSuz View Post
Holy smokes! Not only have you helped me with the correct and properly working regex but you've given me one of the clearest and easiest to understand explanations for regex functions I've ever read! I actually learned several things in your explanation above and beyond the bit of code I was searching for.
You are welcome. Any time you need regex help, just ask. There seems to be a bunch of Regex gurus in this Sigil section.

If you need more in-depth explanations of any in the Regex topic as well, feel free to ask (I can see if I can figure it out and color code + give "in English" explanations).

I seem to be one of the few who color codes the Regex explanations... I find that to be much more understandable (although it takes a little longer to layout/plan/post). Especially when dealing with capture points, it is nice to see the colors matching in input/output.

Always remember though to save a copy of the EPUB before you run any regex, and do not ever use REPLACE ALL unless you have been using for the Regex for a long time and know EXACTLY what it will be doing. Regex is extremely powerful, and it is very easy to mess up (even the best of us sometimes make typos, so I always do a few replace/undo, replace/undo, just to make sure that it is doing what I want).

Also helpful is the Sigil Saved Search feature:

http://web.sigil.googlecode.com/git/..._searches.html

Which allows you to save a list of Searches/Regex, and allows you to easily load/run them.

Quote:
Originally Posted by MizSuz View Post
I'm afraid the book is not public domain or I would share. It's not in terrible condition but there are places where it is obvious it was a pdf or a scan in a former life.
Understandable... I hate when you purchase a book and get a crappy quality book conversion. The thing that stinks though about having to edit a book that you want to read (especially in the case of a fiction book), is that you have the chance to spoil the book beforehand!

Quote:
Originally Posted by theducks View Post
And don't be fooled. This is 100% applicable to Sigil
https://www.mobileread.com/forums/sho...d.php?t=118570

(This is the one that beat REGEX into my thick skull)
This is where I learned most of the Regex (plus seeing a few examples in the sticky Regex topic):

http://www.regular-expressions.info/tutorial.html

Nowadays, I mostly just come up with the Regex off the top of my head according to patterns of errors that I recognize while looking through a book.

Last edited by Tex2002ans; 12-15-2013 at 09:51 PM.
Tex2002ans is offline   Reply With Quote