[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24800: expr 8.25 seems to treat 0 in character class in paren incorr
From: |
Glenn Morris |
Subject: |
bug#24800: expr 8.25 seems to treat 0 in character class in paren incorrectly |
Date: |
Wed, 26 Oct 2016 11:50:13 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Hi,
Please don't report bugs via bcc, else they end up assigned to the wrong
package. I've reassigned this to coreutils and am sending this mail so
it appears on the bug-coreutils list.
address@hidden wrote:
> Hello, coreutils maintainers.
>
> Command expr in version 8.25 of coreutils seems for me to treat
> 0 in character class in paren incorrectly.
> $ for i in {a..z}; do expr $i : '\([a-z]\)$' >/dev/null || echo failed
> at $i; done
> $ for i in {1..9}; do expr $i : '\([1-9]\)$' >/dev/null || echo failed
> at $i; done
> $ for i in {0..9}; do expr $i : '[0-9]$' >/dev/null || echo failed at
> $i; done
> $ for i in {0..9}; do expr $i : '\([0-9]\)$' >/dev/null || echo failed
> at $i; done
> failed at 0
> $ for i in / 0 1 ; do expr $i : '\([/-1]\)$' >/dev/null || echo failed
> at $i; done
> failed at 0
> $ for i in . / 0 ; do expr $i : '\([.-0]\)$' >/dev/null || echo failed
> at $i; done
> failed at 0
> $ for i in {00..99}; do expr $i : '\([0-9][0-9]\)$' >/dev/null || echo
> failed at $i; done
> failed at 00
> $ for i in {000..999}; do expr $i : '\([0-9][0-9][0-9]\)$' >/dev/null
> || echo failed at $i; done
> failed at 000
>
> machine architecture:
> Linux doraemon2 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:
> 09 UTC 2013 x86_64 GNU/Linux
>
> Thank you in advance.
> Due to security policy of my company, I cannot use To and CC fields.
> Sorry for inconvenience.
> --
> iida
- bug#24800: expr 8.25 seems to treat 0 in character class in paren incorrectly,
Glenn Morris <=