Subject: [patch #6027] Fix 's' when using single byte

Update of patch #6027 (project grep):

Status: None => Invalid
Assigned to: None => kasal
Open/Closed: Open => Closed
Summary: Fix '\s' when using single byte string => Fix 's'
when using single byte string


Follow-up Comment #1:

Hello Flavio,
's' is equivalent to character class [:space:] in Perl regular expressions.
So it is valid only with the experimental "grep -P" (or pcregrep, if you have
it installed).

With "grep" (or "grep -E"), you have to use [:space:], e.g.,
"^[[:space:]]*root" in your example.

In POSIX, regular expression 's' is undefined, both as a BRE and ERE, see

I believe that the traditional interpretation was that this regular
expression matched the character 's', which still happens in C locale.

(Your example proves that the traditional behaviour is broken for the
multibyte character sets. But we are in the fields of undefined behaviour


Reply to this item at: