add regex functionality