Do we need to add such a check and throw exception if pattern empty?
Do we need to add such a check and throw exception if pattern empty?