Ticket #4072 (new defect)

Opened 4 years ago

Last modified 4 years ago

mcedit anchored regex line matching inconsistencies

Reported by: ply Owned by:
Priority: minor Milestone: Future Releases
Component: mcedit Version: 4.8.24
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by andrew_b) (diff)

The editor's F4/Replace function with regex matching shows some broken behavior when the regex begins with the line start anchor, and matches whole lines. Try specifying "^.*" for source and "X\0" for target pattern to try to prefix each line with an "X" to see the following behaviors:

  • For consecutive matching lines the replacement only happens on every other line, skipping each candidate that follows a matched line. Maybe matches on consecutive lines are considered overlapping? They shouldn't be.
  • When such a regex fully matches the current line, and the cursor is on the first column, the first match is the following line only. Except when the cursor is on the first line, then the first line also matches. I'd expect the current line to match even if the former cases.

Change History

comment:1 Changed 4 years ago by ply

The source regex was supposed to be caret-dot-asterisk, but Trac apparently interpreted it...

comment:2 Changed 4 years ago by andrew_b

  • Description modified (diff)
Note: See TracTickets for help on using tickets.