View Single Post
Old 06-18-2022, 01:42 AM   #12
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by DaveLessnau View Post
It might be a dependency of the editor, but in Calibre's you'd have to escape the "/" in "</p>". So, it would be:

Code:
([\w,—])<\/p>\s*<p\s*[^>]*?>([\w])
No, its a Regex version thing. Calibre uses Python's regex. That doesn't need the forward slash to be escaped. For others, such as PCRE, it will need to be escaped.

Quote:
Originally Posted by DaveLessnau View Post
@jordy1955: I've been using

https://regex101.com/

to try various regex things and see what they do. It's been a lot of help.

One thing to note, though, the replacement character they use there is a $ instead of the \ used in Calibre's editor. So, if you wanted to test davidfor's replacement string of:

Code:
\1 \2
there, you'd have to use:

Code:
$1 $2
Again, it is the regex version. You should choose Python under "Flavor" to test calibre regex's.
davidfor is offline   Reply With Quote