for each letter in word; do
if [[ $letter = $pattern ]]; then
uppercase it
fi
done
Therefore, pattern (can not be / should not be) more than 1 character, unless its within [ ] then each character gets its turn. Reading the man page does not give me that impression. It hints at it, but is nebulous enough to allow other interpretations.
string='hello there'
read -ra array <<< "$string"
echo "${array[*]^?}"
I was up on your bash FAQ site and read thru it all. I found this example there also. Great site.