DRY with a Regexp.