Opened 11 years ago

Last modified 10 years ago

#338 new enhancement

regex replace treats \n as 2 chars

Reported by: jquelin Owned by:
Priority: minor Milestone:
Component: editor Version: 0.35
Keywords: search regex Cc:


reported by barbie

  • Regex Replace treats "\n" as two separate characters not the newline character (or combination as appropriate).

Change History (1)

comment:1 Changed 10 years ago by zenogantner

  • Keywords search regex added
  • Priority changed from major to minor
  • Type changed from defect to enhancement

Hi barbie,

do you mean in the "Find" or in the "Replace" field?

In the "Find" field, it is recognized as a newline (when regular expressions are activated).
In the "Replace" field, a literal string is expected.

So I do not think this is a defect, rather a missing feature.

What would be nice:

  1. support inserting characters like "\n"
  2. support inserting matched sub-pattern like "$1".

Or did you mean something else?

Note: See TracTickets for help on using tickets.