corrected function to check prime to return predicate values
Modified regex