|
From: | Paul Eggert |
Subject: | bug#24609: egrep '2\.?[0–9]' datafile does not work as expected |
Date: | Tue, 4 Oct 2016 07:46:59 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/04/2016 12:38 AM, Lam Bruce wrote:
egrep '2\.?[0–9]' datafile
I don't see any bug here. That bracket expression matches only the three characters, 0, –, 9, because – (U+2013, EN DASH) is an ordinary character. If you want a range you need to use - (U+002D, HYPHEN-MINUS).
[Prev in Thread] | Current Thread | [Next in Thread] |