updated regex pattern