grep-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Grep-devel] does \w match utf8's EACUTE? -E and -P disagree


From: Jim Meyering
Subject: [Grep-devel] does \w match utf8's EACUTE? -E and -P disagree
Date: Tue, 4 Sep 2018 21:55:14 -0700

FYI, I noticed that grep -E '\w' matches the two-byte UTF8 e-acute,
but was surprised to see that with -P, it does *not* match. And
pcregrep also fails to match:

  $ printf $'\303\251' |LC_ALL=en_US.UTF-8 grep -qE '\w' && echo match
  match
  $ printf $'\303\251' |LC_ALL=en_US.UTF-8 grep -qP '\w'
  [0 1]
  $ printf $'\303\251' |LC_ALL=en_US.UTF-8 pcregrep '\w'
  [0 1]

I confess I don't yet know why this is.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]