View Single Post
Old 02-24-2013, 04:37 PM   #7
Junior Member
Dybbuk began at the beginning.
Posts: 9
Karma: 10
Join Date: Feb 2013
Device: Iphone 4
Originally Posted by DiapDealer View Post
Because there's a difference between editing and parsing. And the Find & Replace feature in most editing software really has nothing to do with parsing code.
Okay, but we're talking about Sigil here. It has everything to do with parsing code. If regex can't parse HTML, why does Sigil use regex?

Originally Posted by DiapDealer View Post
F&R doesn't even know what "code" is. It's simply searching text for patterns you specify. Regex just happens to be one of the most flexible/powerful and common ways to achieve this.
I'll believe that regex is flexible and powerful when it allows me to differentiate between stuff within a paragraph and stuff outside a paragraph. This is incredibly basic parsing, and I'm shocked that regex can't handle it. Why can regex easily find "<p.*/p>" but is totally incapable of identifying stuff that is NOT "<p.*/p>."?

Originally Posted by DiapDealer View Post
What you want to do goes beyond the normal definition of editing or even Searching & Replacing. You're looking for something that automatically transforms code into new codeŚnew code whose conventions you want to be able to specify (and preferably with no data-loss). That's a whole different ball o' wax.. and not something that's easily incorporated into a program (not without hard-coding the transformation rules, anyway; which would seriously limit the feature's usefulness to an end-user).
Huh? All I want to do is delete stuff that's not between <p> and </p>! Sigil can easily find stuff that IS between <p> and </p>. It should be just as easy to select stuff that is NOT between them. It's text selection, nothing more. Trust me, I'm not attempting to sabotage or revolutionize code conventions. I'm just a humble epub converter trying to make sense of modern software.

What about headers? Blockquotes? There's all kinds of situations that can arise in ePubs where text you definitely don't want to lose occurs outside of the <p> tags.
I definitely want to lose all of the stuff outside of the p tags. P-tags aren't really the issue. I just want to know why I can select things between a certain parameter but not things outside the same parameter.
Dybbuk is offline   Reply With Quote