handle the new regex functionality