I found and fixed an off by one in the replacement code, so in normal mode it pastes \1 when no capture groups are included in the regex.
Thanks,
Quote:
Originally Posted by pete6055
Kevin:
I just installed test 377 on WIN10pro. Thanks for working so hard to resolve bugs. I’m sorry to say I found another small one in Find/Replace.
Try:
Mode Normal, All html files, Down
Find: <body>
Replace: <body>\n<h2 class="hdr" title="">\1 <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2>
My Result:
<body>
<h2 class="hdr" title=""> <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2>
================================================== ====
Try:
Mode Regex, All html files, Down
Find: <body>
Replace: <body>\n<h2 class="hdr" title="">\1 <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2>
My Result:
<body>
<h2 class="hdr" title=""><body> <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2>
================================================== ====
If you replace switch \1 and \2 with characters A and B you get the expected:
<body>
<h2 class="hdr" title="">A <br/><span class="smaller">by B<br/><span class="color">© 2022</span></span></h2>
in both regex and normal mode. I think its the succession of switches that causing the problem or the way the \n switch is handled. Not a high priority fix, just something to know.
Thanks, again
|