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 04-24-2017, 02:38 AM   #1
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,142
Karma: 2150557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Clarification about regex "flavor"

Hi

The Calibre editor and Sigil offer to store your "saved searches". I know there are some small differences between them about the regex flavor being supported but I am unable to tell precisely which does what.

On the other hand there are also excellent sites for training and testing purposes like https://regex101.com/.

Is the latter compatible with either Sigil or Calibre? It offers (among several other flavors) a PCRE option.
roger64 is offline   Reply With Quote
Advert
Old 04-24-2017, 04:00 AM   #2
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 3,888
Karma: 10764058
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by roger64 View Post
The Calibre editor and Sigil offer to store your "saved searches". I know there are some small differences between them about the regex flavor being supported but I am unable to tell precisely which does what.
Sigil uses PCRE and, AFAIK, Calibre Editor uses the regex Python library.

IMHO, PCRE is superior to the Python regex library. Pretty much the only thing that PCRE doesn't support is fuzzy matching. If you happen to need fuzzy matching in Sigil, you can use my unofficial Sigil Python re/regex tester validation plugin to search for strings with fuzzy regex expressions.

If you want to give it a try, open an English book, run the RegexTester validation plugin, select the regex engine and enter the following search expression in the Regex box:

(?:\bwant\b){e<=1}

This'll match want, wants, went, wait etc.

(The matches will be displayed in the validation pane.)

You can control the degree of fuzziness by changing the {e<=1} value. For details see the official regex documentation.

You can, of course, use the same syntax in Calibre Editor to search and replace strings.

BTW, RegexTester is a search-only validation plugin that'll only search the currently selected file(s).
Doitsu is offline   Reply With Quote
Old 04-24-2017, 05:17 AM   #3
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,142
Karma: 2150557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
@Doitsu

Thank you very much for such a documented answer. I'll keep it as a reference.
roger64 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
regex "?" with higher priority greedynes then the previous "?" ? user743 Editor 1 05-04-2014 03:57 AM
[Old Thread] Regex "FN LN" to "LN, FN" & reverse? unboggling Library Management 19 11-20-2013 06:44 AM
Samsung Galaxy Tablet in 10" flavor Sonist News 1 08-21-2010 03:11 PM
Display 2008: E-Paper in "57 flavor-packed varieties" / FLEPia still pricy Alexander Turcic News 5 04-17-2008 01:39 PM


All times are GMT -4. The time now is 08:11 PM.


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