small improvement in regex