Thread: A slow regex
View Single Post
Old 06-06-2016, 11:54 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,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
A slow regex

Hi

While usually regex are executed at flash speed with the Calibre editor, this one takes a lot of time to process. It's working but I wonder if I did not write something which slows it?

Code:
{
      "case_sensitive": false, 
      "dot_all": false, 
      "find": "([CLXVI|clxvi]+)<sup>e</sup>\\s?siècle", 
      "mode": "regex", 
      "name": "span century 1 (remplacement global)", 
      "replace": "<span class=\"century\">\\1</span><sup>e</sup> siècle"
    }
roger64 is offline   Reply With Quote