Added regex to condition