Subject: egrep: 'Invalid range end' - bug or not?

From: George Shuklin <[email-masked]>
Date: Thu, 26 Feb 2015 15:28:51 +0200

$ echo 'sample-text'|egrep '[0-9\-a-z]'
grep: Invalid range end

but:

$ echo 'sample-text'|egrep '[0-9a-z\-]'
sample-text

(grep 2.20-4.1)