added regex shorthand code to initial code conversion