Add test case and fix the regex