make grep in getprimary use PCRE