[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gawk] RE bug??
From: |
Bob Proulx |
Subject: |
Re: [gawk] RE bug?? |
Date: |
Thu, 7 Jul 2005 20:45:01 -0600 |
User-agent: |
Mutt/1.5.9i |
Stephen Davies wrote:
> Stepan Kasal wrote:
> > "Silver" and "Actinium" both match /[[:upper:][:digit:]]+/ and
> > /[A-Z][A-Z0-9]+/
> How do Silver and Actium match /[A-Z][A-Z0-9]+/ ?
>
> I agree that my code was the original problem rather than gawk but do
> not see how the above can match.
It can depending upon your locale setting. For example on my system:
echo Silver | LC_COLLATE=en_US awk '/[A-Z][A-Z0-9]+/'
Silver
And it affects other programs that use the RE library too.
echo Silver | LC_COLLATE=en_US grep -E '[A-Z][A-Z0-9]+'
Silver
But of course with LC_COLLATE=POSIX or C then it won't. So whether it
does or not is actually a it depends upon your locale setting. Using
the character classes [:upper:] and [:digit:] as you are doing avoids
these issues.
Bob
signature.asc
Description: Digital signature
- RE bug??, Stephen Davies, 2005/07/05
- Re: RE bug??, Stepan Kasal, 2005/07/05
- Message not available
- Re: [gawk] RE bug??, Stepan Kasal, 2005/07/07
- Re: [gawk] RE bug??, Stephen Davies, 2005/07/07
- Re: [gawk] RE bug??,
Bob Proulx <=
- Re: [gawk] RE bug??, Stephen Davies, 2005/07/07
- Re: [gawk] RE bug??, Bob Proulx, 2005/07/08
- Re: [gawk] RE bug??, Chuck Swiger, 2005/07/08