On 22/07/2021, Shawn Wagner <shawnw.mob...@gmail.com> wrote: > The attached patch (Made against 1.18-pre2) adds a -P option to use > PCRE2 regular expressions. Passing --disable-pcre2 to the configure > script will leave this feature out. There's also a --utf8 option that > turns on PCRE2's advanced Unicode matching.
Hmm. Interesting. Currently ed already seems UTF8-aware. For example: a àèìòù . s/[à]/a/ replaces the two-character sequence with a single 'a' if $LANG ends in .UTF-8, while if LANG=C or is unset, it only replaces the first byte of the pair. Maybe you could find where it detects this and use the same logic instead of --utf8 Cheers M