T
tim
I am new to Regular Expressions and need some assistance with my Zip
Code field validator. I am currently using the following regex to
validate a zip code:
^(\d{5}(( |-)\d{4})?)|([A-Za-z]\d[A-Za-z]( |-)\d[A-Za-z]\d)$
I would like to account for any number of leading and trailing
whitespace characters but am not sure how to do so. Thanks in advance
for your help.
Code field validator. I am currently using the following regex to
validate a zip code:
^(\d{5}(( |-)\d{4})?)|([A-Za-z]\d[A-Za-z]( |-)\d[A-Za-z]\d)$
I would like to account for any number of leading and trailing
whitespace characters but am not sure how to do so. Thanks in advance
for your help.