View Single Post
Old 12-16-2020, 11:48 PM   #37
Doitsu
Grand Sorcerer
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: 5,746
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Find & Replace: new Validate Regex option

I have one more Find & Replace enhancement suggestion: how about adding a simple regex validator?

Apparently, you can actually use a regular expression for this.

But I'm sure that there must be some Open Source C++ libraries for validating regular expressions.

(Since Auto-Tokenize automatically escapes some characters, users shouldn't be able to select both Auto-Tokenize and Validate Regex.)

When Validate Regex is checked and the Find/Replace boxes contain invalid regular expressions, Sigil should display a warning, when the user clicks the Find button. Maybe you could also format invalid regular expressions in red to indicate that they're invalid.
Doitsu is offline   Reply With Quote