Replaced loops with regex... I was tired
Added a test