[fixes #84] make extracting information from the toString method less brittle

<string>.match(<regex>) will return null if nothing is found