Bug report (v1.1-0)

Tool for Search and Replace across multiple files.
Post Reply
User avatar
Frode Hansen

Bug report (v1.1-0)

Post by Frode Hansen »

There is a nasty bug in non-regexp search when the search string includes "$" that when working with my php files has lead to large blocks of text repeating itself several times at seemingly random places, producing a file often three times as large as the original.

I just had it with:
Search string: "</span><hr /><div>$_var"
Replace string: "</span><br /><div>$_var"
Of course, with backup disabled, and 20+ large files affected :)

I assume I'm not the only one working with texts containing "$", so I guess it's something in my code that triggers it.

Not a very specific bug report, I'll do some research and get back with more details when I have some time.
User avatar
Frode Hansen

Post by Frode Hansen »

The bug occurs with variablenames starting with underscores, and "$_" is replaced with the entire file content.
User avatar
DV

Post by DV »

You're right - thanks for spotting this. $_ seems to be a pipeline variable in the regex script library and it's dumping a complete copy of the input file at that point. I'm trying to work out a way of escaping it.

Post Reply