View Single Post
Old 03-09-2022, 10:03 AM   #90
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,808
Karma: 6000000
Join Date: Nov 2009
Device: many
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 View Post
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
KevinH is online now   Reply With Quote