cleanup regex and test for recursion