Regex is working fine with shell script as asked by me in different thread but when I use echo command as
echo "2001:0Db8:85a3:0000:8a2e:0370:7334" | grep "^([0-9a-fA-F]{0,4}:){1,7}([0-9a-fA-F]){0,4}$"
There is no output and echo $?
returns 1
Do regex not work with echo/grep?