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 10-21-2010, 07:08 AM   #16
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by bobcdy View Post
And it isn't just unclosed code. For example, in the file I had a separate line

<span class="page">jkl;asdfa</span>

This was what I was trying to get rid of all the extra line feeds with regex. Sigil insisted on adding <p> and </p> for this and all similar lines
As ducky said, you can't have a "naked" span as a direct child of the <body>, much like you can't have a naked <i>, <b> etc. It's an inline element, not a block one.

Quote:
Originally Posted by bobcdy View Post
and every once in a while it likes to add <p>&nbsp</p> and other additions.
Tidy will never insert that.

Quote:
Originally Posted by bobcdy View Post
I'll eventually have to bite the bullet and really really try to learn regex well enough to use it in Sigil. A problem, though, is that the regex flavors of Notepad++ and Sigil are different and I use both extensively. It's very confusing to me...
Notepad++ uses a proprietary and very, very limited subset of common regex operations. I've transitioned to UltraEdit because of that limitation alone.

Sigil OTOH uses a very powerful Perl-like regex engine. It has its limitations, but it's still orders of magnitude more powerful than the one in Notepad++.
Valloric is offline   Reply With Quote
Old 10-21-2010, 02:09 PM   #17
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
I downloaded UltraEdit and tried regex search with \s+ Did not work* although it worked with Sigil, but not with Notepad++. That's been my problem with regex all along. It seems that one needs to learn a new version of regex for each program one uses, and of course I never know which version is the correct one or how to find resources for that specific version. When I try to learn regex, I go to the internet and read a bit about it and try the examples. They usually don't work with either Sigil or Notepad++, and it seems that UltraEdit is not a solution for me because its version of regex, whatever it is, is not identical to that of Sigil. How does one ever learn regex? It's like trying to work with html, but with the added restriction that each application requires its own html version and other versions just won't work...and of course each application seems to keep it a secret about which is the precise version to use.

Least I sound too negative, here's a quote from a regex book:
"There is no official standard that defines exactly which text patterns are regular expressions and which aren’t. As you can imagine, every designer of programming languages and every developer of text processing applications has a different idea of exactly what a regular expression should be. So now we’re stuck with a whole palate of regular expression flavors."

(Regular Expressions Cookbook, by Jan Goyvaerts and Steven Levithan)

*after experimenting with UltraEdit, I found that choosing s+ worked fine with a choice of the Perl version of regex.
Bob

Last edited by bobcdy; 10-21-2010 at 02:47 PM. Reason: added new text
bobcdy is offline   Reply With Quote
Old 10-21-2010, 03:06 PM   #18
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by bobcdy View Post
I downloaded UltraEdit and tried regex search with \s+ Did not work* although it worked with Sigil, but not with Notepad++. That's been my problem with regex all along. It seems that one needs to learn a new version of regex for each program one uses, and of course I never know which version is the correct one or how to find resources for that specific version. When I try to learn regex, I go to the internet and read a bit about it and try the examples. They usually don't work with either Sigil or Notepad++, and it seems that UltraEdit is not a solution for me because its version of regex, whatever it is, is not identical to that of Sigil.
UltraEdit has several regex engines at its disposal. You pick the one you want. The one I care about is the Perl one, which uses PCRE.

In general, you can separate applications that offer regular expressions into two camps: those that offer an engine and syntax similar to the one used in Perl, and all the others.

Hint: the ones that offer something similar to Perl are much more successful.
Valloric is offline   Reply With Quote
Old 10-21-2010, 07:54 PM   #19
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Strongly recommend NoteTAB Pro, not NotePAD++. Has brilliant regex, clips (macros) and just about every-danged-thing under the sun. Works fantastically well for epub creation (and editing if you have to 'splode them). You can open all the html or xhtml "chapters" of an epub simultaneously, and regex 'em all, across docs. Capidamonte, here on MR, turned me on to this, and I cannot tell you what a wonderful tool it really is. I only use a tenth of its superpowers, and it's still 1000% better than anything else. The clip editor is magic.

EDIT: OOOPS, nearly forgot, there's a free version ("light") you can try, the paid version is dirt cheap.

HTH,

Hitch

Last edited by Hitch; 10-21-2010 at 07:55 PM. Reason: RE: OOOPS!
Hitch is offline   Reply With Quote
Old 10-21-2010, 08:22 PM   #20
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
Valloric & Hitch,
Thanks for the info about substitutes for my notepad++. I've already downloaded the UltraEdit, and that looks pretty good. One can chose the flavor of regex which helps greatly. I'll try NoteTab Pro also. Of course it may be difficult to choose between them, but I think that notepad++ has to go. NP++ is useful, though, because one can have a spelling plug-in.
Bob
bobcdy is offline   Reply With Quote
Old 10-22-2010, 04:31 PM   #21
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by bobcdy View Post
Valloric & Hitch,
Thanks for the info about substitutes for my notepad++. I've already downloaded the UltraEdit, and that looks pretty good. One can chose the flavor of regex which helps greatly. I'll try NoteTab Pro also. Of course it may be difficult to choose between them, but I think that notepad++ has to go. NP++ is useful, though, because one can have a spelling plug-in.
Bob
NoteTAB Pro has a spellchecker built-in. ^^

Hitch
Hitch is offline   Reply With Quote
Old 10-22-2010, 07:08 PM   #22
bobcdy
Fanatic
bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.bobcdy ought to be getting tired of karma fortunes by now.
 
bobcdy's Avatar
 
Posts: 527
Karma: 1048576
Join Date: May 2009
Device: bebook; prs-950; nook simple touch; HTC Jetstream tablet
Hitch,
I've looked both UltraEdit and NoteTab Pro both in trial versions. They are both pretty close; both have spell checkers, etc. but one definite advantage is the UE has a well defined Perl regex and has both a short list of the syntax and a url reference to a more complete one from http://www.boost.org/doc/libs/1_33_1....html#synopsis.

This means that I know exactly what syntax will work in UE whereas I'm not clear about this with NTP. For example, the regex express \s+ worked in UE (and Sigil) but not in NTP. What flavor of regex does NTP or Notepad++ use? My major problem with regex is that I never know which of the many flavors I'm working with in a particular program. Then I get frustrated when something that should work according to a web page doesn't work. As a beginner with regex this is a particularly difficult sort of problem.
Bob
bobcdy is offline   Reply With Quote
Old 10-23-2010, 09:21 PM   #23
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by bobcdy View Post
Hitch,
I've looked both UltraEdit and NoteTab Pro both in trial versions. They are both pretty close; both have spell checkers, etc. but one definite advantage is the UE has a well defined Perl regex and has both a short list of the syntax and a url reference to a more complete one from http://www.boost.org/doc/libs/1_33_1....html#synopsis.

This means that I know exactly what syntax will work in UE whereas I'm not clear about this with NTP. For example, the regex express \s+ worked in UE (and Sigil) but not in NTP. What flavor of regex does NTP or Notepad++ use? My major problem with regex is that I never know which of the many flavors I'm working with in a particular program. Then I get frustrated when something that should work according to a web page doesn't work. As a beginner with regex this is a particularly difficult sort of problem.
Bob
Hi:

As a bit of a REGEX virgin myself, (I hear @capidamonte laughing maniacally somewhere), I know exactly what you mean. NT Pro (which is unrelated to NotePAD, FYI) has a built-in help section/tutorial on Regex, I've learned a ton from it. It uses:

Quote:
PCRE is the software library for "Perl Compatible Regular Expressions" built into NoteTab versions 5.0 and above.
You might want to open up the freebie (light) version and read the help section on Regex--it's an entire help section unto itself with 28 sub-sections. Woo-hoo!

Hitch
Hitch 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
Break up feed BrianG Calibre 2 01-09-2010 06:13 PM
RSS Feed timezone Feedback 8 01-02-2010 06:55 PM
the feed only contains a link ... alexxxm Calibre 7 02-18-2009 08:43 AM
Google Book Search to search full-text books online Bob Russell Deals and Resources (No Self-Promotion or Affiliate Links) 1 08-19-2006 12:13 PM


All times are GMT -4. The time now is 07:13 AM.


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