[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in regexp in grep
From: |
Grzegorz Woźniak |
Subject: |
Bug in regexp in grep |
Date: |
Fri, 19 Oct 2012 08:37:42 +0200 |
User-agent: |
KMail/4.9.2 (Linux/3.0.46-1-lts; KDE/4.9.2; x86_64; ; ) |
Hi, I noticed odd behaviour using egrep, detail below:
1) Arch x86_64, grep (GNU grep) 2.14
address@hidden dziwas]$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
address@hidden dziwas]$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff
2) Debian 6.0.6 x86_64, GNU grep 2.6.3
address@hidden:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
address@hidden:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff
3)Debian 6.0.1, GNU grep 2.6.3
address@hidden:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
address@hidden:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff
4) and finally my company notebook with old not updated Arch i686 (I love kde
3.5 and cant imagine work without it :) ), also GNU grep 2.6.3 but result is
something what I would expect:
address@hidden ~]$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
cc
ff
address@hidden ~]$ echo -e 'aB\nBa\ncc\nff\nGg'|egrep '^[[:lower:]]'
aB
cc
ff
--
Best regards,
Grzegorz Woźniak
- Bug in regexp in grep,
Grzegorz Woźniak <=