View Single Post
Old 10-15-2009, 08:18 AM   #40
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 JohnnyD View Post
OK, time for a suggestion everyone will burn down straight away

I needed some kind of text changed in 50+ chapters (it was some navigational code in a bunch of HTML-files which I was converting to an epub-book). So I took a deep breath, googled a bit, read a bit and wrote my first regular expression. Using Search&Replace in jEdit. And it was really easy (I must admit, though, that I have been a software engineer for 15 years).

So here is another scripting alternative for Sigil: Global Search&Replace with support for regular expressions! It should be quite easy to implement in Sigil (there are lots of regex libraries with well-defined API's) and I think it will take care of 99% of my scripting needs...

Anyone in favor of this option?

If you're unsure, check out this tutorial for regular expressions
You may have missed that S&R with regex support is actually being worked on right now and will end up in the next release.

Just FYI, regexes are not really a scripting language.
Valloric is offline   Reply With Quote