7.1.0 on Win7 Ultimate
7.1 appears to have broken regular expressions. Simplest text case: put several new lines in a new file, then replace "^" with "(". It will say "xx replaced", where xx is the number of blank lines, but there's nothing there. IOW, no parentheses were added.
I originally found the problem while trying to add a closing parenthesis at the end of a line, so the above isn't the only thing that's broken, just a sample.
I downgraded to 7.09 (after having to Google to find it) and it works fine.
7.1 broke regex
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
From the documentation for Replacement Format Strings in the online help:
In the case you described, TextPad is inserting an empty lexical group, but it would be better if it flagged the unmatched parenthesis, as it does for regular expressions.The characters '(' and ')' perform lexical grouping, so use \( and \) if you want a to output literal parenthesis.
It was "broken" before (not really broken, per se, it just didn't conform to the documentation). Now it "works".
Even
-Find what: xxx
-Replace with: ))))))))))))))))))))))))))))))))))))
-Regex CHECKED
now replaces the X-s with NOTHING, where before 7.1 it replaced it with those literal parens.
An additional issue I had upgrading to 7.1 was that for many months I was successfully using
to unindent the selected text. Now in 7.1 it doesn't work. As advised by TextPad support, here is a much simpler and elegant regex that does the same thing:
I changed it, and it works in 7.1 again.
Even
-Find what: xxx
-Replace with: ))))))))))))))))))))))))))))))))))))
-Regex CHECKED
now replaces the X-s with NOTHING, where before 7.1 it replaced it with those literal parens.
An additional issue I had upgrading to 7.1 was that for many months I was successfully using
Code: Select all
^[\t ]*(?=[\S])
Code: Select all
^\h+
If by "before" you mean the entire history of TextPad. I've been using it since 4.x, i.e. for 13+ years, and it's worked this way at least that long. After that much time, the behavior is de facto correct, and it's the documentation that's wrong.jeffy wrote:It was "broken" before (not really broken, per se, it just didn't conform to the documentation). Now it "works".
Further, other than the phrase appearing in the help, there's no indication of what "lexical grouping" even means in a replacement expression (I obviously understand why the parentheses have to be quoted in the search expression).
Why, after all this time, did this suddenly change?