stringZ=abcABC123ABCabc

echo ${stringZ:7:3} # 23A

(http://www.dreamy.pe.kr/zbxe/CodeClip/3766012)