Move regex patterns to constants.