Changing longhand to shorthand code to use regex as parser