Hello everyone,
I'm trying to use regex for dynamic id remplacement but I got some error that I don't know how to fix, that's why I'm asking for help.
I've seen somewhere in this website that Sigil use PCRE.
Regex pattern :
Code:
<a id=\"(.*)?\">([\W\s]*)?([\w]+)( ([ \?*])+)?((, )?(.*)?([A-Z])(.*))?<\/a>
Replace pattern :
Code:
<a id="\3\9">\2\3\4\6</a>
Test string :
Code:
<a id="">Anzil ou Auzil, Jacques d’</a>
The result I want :
Code:
<a id="AnzilJ">Anzil ou Auzil, Jacques d’</a>
But the result I got :
Code:
<a id="AJ">Anzil ou Auzil, Jacques d’</a>
Note that this regex work with
https://regex101.com and
https://regexr.com.
Sigil version : 0.9.10.