Insert attributes (strings) within existing tags.
I need to insert the number found within <pagenum><pagenum/> into the id=attribute so in this example.
I start with:
<pagenum page="normal" id="page">1<pagenum/>
and I need to replace it with:
<pagenum page="normal" id="page1">1<pagenum/>
The string in there could be any alphanumeric value.
What would this regex look like?
Something like this?
/s/<pagenum page="normal" id="page">1<pagenum//>/<pagenum page="normal" id="page"{Value}>1\<pagenum/>
I`m too rusty on my backreferencing…
Try:
e.g.:
Note – isn’t a closing tag usually
</pagenum>as opposed to<pagenum/>?