Thread: Regex examples
View Single Post
Old 09-18-2020, 11:18 AM   #670
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,733
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil's PCRE regex engine certainly supports positive lookbehinds. It just doesn't support variable-length lookbehinds--positive or negative. It's a known limitation of the PCRE engine.

Use \K to simulate a variable-length lookbehind:
Code:
<p>–( .*?)\K<\/p>
Make sure "Minimal Match" is unchecked when using the above expression.

More on the use of \K here: https://www.regular-expressions.info/keep.html
DiapDealer is online now   Reply With Quote