What is wrong with below regex in unix ?
echo AB345678 | sed -n '/^\([a-zA-Z]\{2\}[0-9]\{6\}|[0-9]\{8\}\)$/p'
echo 12345678 | sed -n '/^\([a-zA-Z]\{2\}[0-9]\{6\}|[0-9]\{8\}\)$/p'
i am not getting the output :(
I mean the string I echoed why is it not matching with my regex? Whats wrong with my regex?