Quote:
Originally Posted by 1v4n0
Yeah, and also, "space dash word" does not appear in the spellcheck, at least not with perfectEpub.
|
Ahh yes yes, I see what you mean. Regex would definitely help in that situation!
Quote:
Originally Posted by 1v4n0
I'm learning a lot stuff here. Maybe someday someone will pay me for all the things I know 
|
Everyone starts somewhere!
The more you mess around with it, you just slowly will absorb more and more knowledge. Next thing you know, you will have lots of regexfu, and you will be up there with the masters!
Quote:
Originally Posted by Notjohn
I've always had this worrisome feeling that regex -- the very term! -- is beyond my payscale. Now that I see an example of regex in action, I know that I was right to be fearful.
|
No need to be "fearful". If you stick with the super basic stuff (like the ones I gave above), you will most likely not run into any sorts of problems (although I stress, you shouldn't run Regex willy nilly, and never Replace All, unless you know EXACTLY what the Regex is doing, and have tested it thoroughly).
Regular Expressions save me TONS of hours of work every single day, and it allows me to catch really obscure/hard typos, that otherwise would be quite hard to spot with just your naked eye (or old school Search/Replace). I have even caught hundreds of typos in books that have been professionally edited and then laid out by a pro typographer. (Working directly in code = way more granularity than at the GUI Word Processor/Typography programs).
For example, in a similar vein as an accidental hyphen attached to a word, sometimes OCR causes accidental commas attached to a word:
Quote:
This is a sample sentence,this is another example.
|
This can easily be caught with something like:
Search: ([a-z]),([a-z])
Replace: \1, \2
or one that I catch ALL THE TIME in books is with page numbers accidentally attached to the "p.":
Quote:
This is a sample quote (LastName, p.123).
|
Search: (p\.)([0-9])
Replace: \1 \2
Regex also helps when you have to clean up a lot of abysmal code. For example, cleaning up all of the Calibre### classes, or the absolutely atrocious InDesign overrides.
I don't know how I survived before I knew Regex!