| Summary: | ^$\n in replace (reg. exp.) does not work. | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | thomas krause <th_k> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
thomas krause
2007-03-31 12:04:16 UTC
INVALID The regexp '^$\n' makes no sense, it tries to match a newline _after_ the end of the line ($). The regexp for an empty line is simply '^$'. (note: kregexpeditor rightfully complains when you try entering '^$\n': Your regular expression is invalid, due to something following a 'line end') Cheers. In reply to comment #1: I doubt this is true in all cases: When replacing "^$\n" with "XXX" in the three-line text "one\n\nthree" with EmEditor I get out "one\nXXXthree". This is what I expected since afaik "$" does not eat the newline. But since Kate doesn't support multi-line Regex yet, anything containing "\n" will not do what you want. Kate does not support finding text that spans more than one line. We have a GSOC project for it, and some students might start work on it even outside GSOC. This bug is a dub, there are dozens of reports of this problem, even though the situation is clearly stated in the docs and several places on internet. |