coreutils
coreutils copied to clipboard
`expr` failed to match multibyte character
regex engine should match the . to the multibyte characters.
> expr match 你好a ..a
3
> ./target/debug/coreutils expr match 你好a ..a
7
we are using onig (a wrapper around the Oniguruma regular expression library) to deal with regex, however, oniguruma will never support locale.
Yes, this is why we can't completely pass the expr-multibyte.pl GNU test.
At some point if we want locale support for regexes, we will have to switch from oniguruma.
c.f. https://github.com/uutils/coreutils/pull/8292#discussion_r2192901229
Fixed by #8606