fix regex and edit test case