remove nested repeat operator in regex