Thread: Regex examples
View Single Post
Old 09-18-2020, 08:54 AM   #668
ShdwMnrch
Junior Member
ShdwMnrch began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2020
Device: none
Hello,
I need help on regex, i have lines like these
Code:
<p>– Wahahahaha!</p>

<p>Grasha got drunk, raged and got on the table.</p>

<p>– Wahahahaha! This is a celebration party! Drink and sing guys!</p>
The dialogues are preceded with "<p>– " but I wanna wrap the dialogues with 「」these characters. I had no problem replacing the
"<p>–" to " <p> 「" but I having problems replacing "</p>" when "<p>– " is present in the beginning of the lines.

I have tried the regex search of:
Code:
(?<=<p>– .*)<\/p>
It should find only the "</p>" of the 1st and 3rd line, ignoring the 2nd line. But it seems like sigil regex doesn't support positive lookbehind and it returns nothing. Please help for any workaround. Thanks!
ShdwMnrch is offline   Reply With Quote