Refactor regex + fixed bugged where left hand side was left out of the return string
test cases
Refactor array pass