[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Case insensitivity seems to ignore lower bound of interval
From: |
Eric Bischoff |
Subject: |
Re: Case insensitivity seems to ignore lower bound of interval |
Date: |
Thu, 28 Apr 2011 12:21:37 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; ) |
Le jeudi 28 avril 2011 12:00:33, vous avez écrit :
> You seem to think this is gawk-specific, but in fact any locale-aware tool
> that uses regular expressions behaves the same (try eg with sed or grep).
Not here:
$ echo 'ijklmnopqrstuvwxyz'| sed 's/[r-z]/X/g'
ijklmnopqXXXXXXXXX
$ echo 'ijklmnopqrstuvwxyz'| sed 's/[R-Z]/X/g'
ijklmnopqrstuvwxyz
$ echo 'ijklmnopqrstuvwxyz'| awk '{gsub("[r-z]", "X"); print}'
ijklmnopqXXXXXXXXX
$ echo 'ijklmnopqrstuvwxyz'| awk '{gsub("[R-Z]", "X"); print}'
ijklmnopqrXXXXXXXX
$ echo 'ijklmnopqr'| grep "[r-z]"
ijklmnopqr
$ echo 'ijklmnopqr'| grep "[R-Z]"
$ awk --version | head -n 1
GNU Awk 3.1.7
$ sed --version | head -n 1
GNU sed version 4.2.1
$ grep --version | head -n 1
GNU grep 2.6.3
Those results were predictable for sed and grep, not for awk. Furthermore,
they are inconsistent between awk and sed.
--
Éric Bischoff - Bureau Cornavin
Technical writing and translations
http://www.bureau-cornavin.com
(+33) 3 68 46 00 85
sip:address@hidden
- Re: Case insensitivity seems to ignore lower bound of interval, (continued)
Re: Case insensitivity seems to ignore lower bound of interval, arnold, 2011/04/28
- Re: Case insensitivity seems to ignore lower bound of interval, Eric Bischoff, 2011/04/28
- Message not available
- Re: Case insensitivity seems to ignore lower bound of interval, Eric Bischoff, 2011/04/28
- Re: Case insensitivity seems to ignore lower bound of interval, Davide Brini, 2011/04/28
- Message not available
- Re: Case insensitivity seems to ignore lower bound of interval, Eric Bischoff, 2011/04/28
- Re: Case insensitivity seems to ignore lower bound of interval, Davide Brini, 2011/04/28
Re: Case insensitivity seems to ignore lower bound of interval, Paul Jarc, 2011/04/28
Re: Case insensitivity seems to ignore lower bound of interval, Eric Bischoff, 2011/04/29
Re: Case insensitivity seems to ignore lower bound of interval, Aharon Robbins, 2011/04/29