Validating zip code
To do that in this case, we would write: which would match either of these. The final way is to use one of the quantifiers I discussed before. ” quantifier, we can write: ^\d # 5 character zip code(-\d)?
# optional “ 4” suffix$ I think this would be my preferred solution.
Note that I used the meta character “O” (letter or digit).Though we used parenthesis for grouping, they actually have other uses as well in regex. If you’ve used regex before, it should seem simple to you. Tune in next week, where the word for the day will be “capture”. In this case CDXZip Stream will automatically add a leading zero to any four digit input, as shown below: You may want to consider formatting any cells containing input zip codes as text to retain leading zeros and avoid confusion.CDXZip Stream will automatically truncate an extended zip code in order to ensure data will be returned for the 5-digit code.