Closed okrick closed 3 years ago
Hi Rick - I thought it was fixed too. The previous reports were #121 and #308.
I have just tried recreating it using release 1.2.4, but I cannot make it go wrong. I also tried the example you included in #121 but it didn't go wrong - does this look like the problem you are reporting?
Search: <table((.|\n)+?)</table>
Replace: <div class="center"><div class="ilb">\n<table$1</table>\n</div></div>
Text:
<hr />
<table class="p1" summary="Errors in the books">
<tr>
<td class="tdl">An overstatement of net income of</td>
<td class="tdr">$2,721,068</td></tr>
<tr>
<td class="tdl">A mischarge of worn-out equipment to profit and loss of</td>
<td class="tdr">2,843,596</td></tr>
</table>
<hr />
So, I can think of two possibilities. Either, there is some odd situation in your latest file that is still triggering the bug even though the original bug is fixed. Or, you were accidentally running a different release (not 1.2.4) for some of your work, and the problem happened using that.
Hopefully, this is just a mix-up, but if not, I'll look into it again once I get your clarification. Thanks
/*((\n|.)+?)*/
.ta hr s='' w=none$1.ta-
12,546 nurses--Total cost $2,230,200.00
12,546 nurses--Total cost ,230,200.00
Cheers,
Thanks - definitely goes wrong - I'll look into why that is
Doh! I only made the code give special treatment to the first dollar sign in the found text, instead of all dollars. Sorry.
If you want to fix your code, edit SearchReplaceMenu.pm which is in lib/Guiguts Find line 725, which should say
$match =~ s/\$/\\\$/;
and add the letter "g" for "global" just before the semicolon at the end, i.e.
$match =~ s/\$/\\\$/g;
I'll put this fix in 1.3 of course.
Describe the bug A "$2" sequence is replaced by a "\n" during a regex S&R where the "$2" sequence is part of the found text replaced by quoting.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect a '$2' string to be replaced by a '$2' string.
Environment
This file has two instances of $2 which were replaced by \n: https://www.pgdp.net/projects/projectID47b9ed7181d66/projectID47b9ed7181d66.zip
Additional context Sorry, I thought this was fixed. I looked for the old bug report but didn't find it.