bug-grep
[Top][All Lists]
Advanced

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

bug#24609: egrep '2\.?[0–9]' datafile does not work as expected


From: Lam Bruce
Subject: bug#24609: egrep '2\.?[0–9]' datafile does not work as expected
Date: Tue, 4 Oct 2016 15:42:19 +0800

By the way, here is the version info:

egrep -V
grep (GNU grep) 2.24

uname -a
Linux freeland 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux

gcc --version
gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413


2016-10-04 15:38 GMT+08:00 Lam Bruce <address@hidden>:

> Dear Sir/Madam:
>
>       I put all files in the atttachment.
>
>        cat datafile
>
> northwest NW Charles Main 3.0 .98 3 34
> western WE Sharon Gray 5.3 .97 5 23
> southwest SW Lewis Dalsass 2.7 .8 2 18
> southern SO Suan Chin 5.1 .95 4 15
> southeast SE Patricia Hemenway 4.0 .7 4 17
> eastern EA TB Savage 4.4 .84 5 20
> northeast NE AM Main Jr. 5.1 .94 3 13
> north NO Margot Weber 4.5 .89 5 9
> central CT Ann Stephens 5.7 .94 5 13
> 989
>
> egrep '2\.?[0–9]' datafile
> eastern EA TB Savage 4.4 .84 5 20
>
> egrep '2\.{0,1}[0–9]' datafile
> eastern EA TB Savage 4.4 .84 5 20
>
> egrep '2\.\{0,1\}[0–9]' datafile
>
> egrep '2\.{0,1}[0-9]' datafile
> western WE Sharon Gray 5.3 .97 5 23
> southwest SW Lewis Dalsass 2.7 .8 2 18
> eastern EA TB Savage 4.4 .84 5 20
>
> egrep -n '2\.{0,1}[0-9]' datafile
> 2:western WE Sharon Gray 5.3 .97 5 23
> 3:southwest SW Lewis Dalsass 2.7 .8 2 18
> 6:eastern EA TB Savage 4.4 .84 5 20
>
> Best Regards,
>
> Bruce
>


reply via email to

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