Fix on regex
Add test cases