#!/bin/bashecho "AB345678" | sed -n '/^\([a-zA-Z]\{2\}[0-9]\{6\}\|[0-9]\{8\}\)$/p'
Standard input is empty
AB345678
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!