updated with regexp patterns