fix `catch` with empty regexp and allow `catch` to take pattern string