handle nil; define the regexp body once