abstracted out a regex builder