EmEditor (text editor) Forum Index EmEditor Core Enhancement Suggestions
Ignore \r in regex | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| Deipotent | Posted on: 8/25/2011 9:46 am |
Just can't stay away ![]() ![]() Joined: 2/15/2008 From: Posts: 118 |
Re: Ignore \r in regex After thinking about this again, I re-looked at the regex in my linked post for finding duplicate lines, and realised that there appears to a bug in EmEditor's regex parser.
My suggestion for ignoring \r already appears to be implemented. Let me give some examples to explain: 1) Even if EmEditor didn't ignore \r, the following regex should work as the part, "\r?", is saying match zero or one occurrences of \r. So it should match whether there is a \r or not. But it doesn't. 2) However, if you remove the '?', so the regex becomes as follows, it works, and matches duplicate lines: 3) It also works if you have the original regex, but replace "\r" with "(\r)": So, the bug appears to be that EmEditor seems to have a problem applying '?', when it follows a \r. It already seems to just remove the "\r", so the original regex ends up being turned into which doesn't work. |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| |
Deipotent | 8/24/2011 9:10 am |
| |
Stefan | 8/24/2011 12:02 pm |
| |
Deipotent | 8/24/2011 5:08 pm |
| |
Stefan | 8/25/2011 4:54 am |
| |
Deipotent | 8/25/2011 6:20 am |
| » |
Deipotent | 8/25/2011 9:46 am |
| |
CrashNBurn | 9/22/2011 3:37 pm |
| Register To Post | |


