-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mcedit anchored regex line matching inconsistencies #4072
Comments
The source regex was supposed to be caret-dot-asterisk, but Trac apparently interpreted it... |
|
Branch: 4072_mcedit_replace_bol |
Nitpick: Ticket 4072 - # is missing. |
|
|
I'm happy to see new tests, but they fail on Ubuntu and macOS in CI. Probably because of PCRE2? Build logs are attached or available from GitHub. |
Replying to zaytsev:
Yes, with PCRE2 replace works unexpected at end of file. |
So, now I have tests passed with glib and pcre2 search engines but not with pcre.
The pcre library is at version 8.45. This version of PCRE is now at end of life, and is no longer being actively maintained. Version 8.45 is expected to be the final release of the older PCRE library. The latest release was in 2021-06-22.
Honestly speaking, I don't want to waste my time with pcre. I propose to drop the pcre engine from mc. |
I agree. But actually, I wonder why we need direct support for PCRE2 at all. Do you know if there are good reasons for it? I thought that glib provides regex support, so we can just rely on that. |
Replying to zaytsev:
Some historical reasons. GRegex as PCRE wrapper was introduced in GLib-2.14. PCRE was required for MC on OSes with GLib < 2.14. Currently MC requires GLib >= 2.32. Since 2.73.2 (released at 2022-07-08), GRegex is based on PCRE2.
I agree, we can remove PCRE and PCRE2 from MC and use GLib only. |
Sounds great to me. Your explanation makes sense. Please feel free to do so in this ticket, or create another one. Thank you very much! |
Rebased to current master. |
|
Now tests still fail on macOS. |
Fixed. |
In the first commit, "Ticket 4072" is missing #. Otherwise, it looks good and I'm happy about the tests. Sorry I can't give a more satisfying review. |
|
Important
This issue was migrated from Trac:
ply
(ply@…-online.hu)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:
Note
Original attachments:
zaytsev
(@zyv) onFeb 9, 2025 at 11:01 UTC
zaytsev
(@zyv) onFeb 9, 2025 at 11:01 UTC
zaytsev
(@zyv) onFeb 23, 2025 at 8:20 UTC
The text was updated successfully, but these errors were encountered: