ConfirmIt 5 digit zip code validation

Check if the provided answer is a 5 digit zip code using regular expressions.

//surveyscripting.com

var zipcode : String = f('Q1').get();
var re = /^\d{5}$/;
if (zipcode.search(re) == -1)
{
  RaiseError();
  SetErrorMessage(CurrentLang(), 'Please select a five digit zip code.');
}