Code: Select all
case "${FOO}" in
[0-9a-eA-E]* ) echo BAR ;;
esacSupposedly, prefixing a pattern with '+' should make it match "one or more" occurances, which is exactly what I'm looking for, but I can't figure out how it should be used...
Code: Select all
case "${FOO}" in
( +([0-9a-eA-E]) ) echo FOO ;;
+([0-9a-eA-E]) ) echo FOO ;;
(+([0-9a-eA-E])) echo FOO ;;
+([0-9a-eA-E]) echo EEE ;;
esacVarious quoting and putting the pattern in a variable hasn't worked, either...
I'm testing with both bash and dash atm, but would rather avoid any bash specific alternatives with '[[', and I am aware of potential locale issues with the [0-9a-eA-E] pattern.
Anyone know the correct syntax for this?
Thanks.

