Package: grep
Version: 2.5.3~dfsg-2
Severity: normal

The problem roughly boils down to this:
======================================================================
[EMAIL PROTECTED]:~$ echo '88.77.87.16' | LANG=C LC_CTYPE="de_DE.UTF8" grep -E 
'(([1-9][0-9]|[0])\.){2}'
[EMAIL PROTECTED]:~$ echo '88.77.87.16' | LANG=C LC_CTYPE="de_DE.UTF8" grep -E 
'(([1-9][0-9]|0)\.){2}'
88.77.87.16
[EMAIL PROTECTED]:~$ echo '88.77.87.16' | LANG=C LC_CTYPE="de_DE" grep -E 
'(([1-9][0-9]|[0])\.){2}'
88.77.87.16
[EMAIL PROTECTED]:~$ echo '88.77.87.16' | LANG=C LC_CTYPE="de_DE.UTF8" grep -E 
'(([1-9][0-9]|[0])\.){1}'
88.77.87.16
[EMAIL PROTECTED]:~$ echo '88.77.87.16' | LANG=C LC_CTYPE="de_DE.UTF8" grep -E 
'(([1-9][0-9]|[0])\.)(([1-9][0-9]|[0])\.)'
88.77.87.16
[EMAIL PROTECTED]:~$ 
======================================================================

There is something wicked going on.  The first regexp does not match,
although it should.  Removing the brackets from the 0, setting the
CTYPE to non UTF-8, setting the repetition count in the braces to 1 or
simply doubling the subexpression instead of using a repetition count
all make the regexp match.

Thanks,
Jö.


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grep depends on:
ii  libc6                         2.6.1-1+b1 GNU C Library: Shared libraries

grep recommends no packages.

-- no debconf information

-- 
If you receive something that says "Send this to everyone you know,"
pretend you don't know me.

Attachment: signature.asc
Description: Digital signature

Reply via email to