On 2010-12-03 22:30Z, Lee Rothstein wrote: [script:] > if [[ "$1" =~ [A-Z] ]] ; then > echo Contains Capital Letters: $1 > else > echo Doesn\'t Contain Capital Letters: $1 > fi [...] > # WTF, O > $ t_regex dfgh > Contains Capital Letters: dfgh
Inspect this option: shopt -p | grep nocasematch Perhaps you have it set in your startup files? Example of different 'nocasematch' settings with the same command: $ shopt -u nocasematch $ if [[ "a" =~ [A-Z] ]] ; then echo UPPER; else echo lower; fi lower $ shopt -s nocasematch $ if [[ "a" =~ [A-Z] ]] ; then echo UPPER; else echo lower; fi UPPER -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple