modified regex for sequence validation