[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

Regular Expressions

This is not an exam or homework

You are using a RegularExpressionValidator to make sure that the user enters a 5 digit US-Zip code, but you are not actually checking if the zip code exists. Which of the following validation expressions achieves this goal?
0
cybernation989
Asked:
cybernation989
  • 2
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>This is not an exam or homework
I am sorry, but this looks too much like it, or like exam preparation.
0
 
cybernation989Author Commented:
Sorry forgot this

1. "\d{5}"
2. "[0-9]+"
3. "5*(\d)"
4. "\d[5]"
0
 
cybernation989Author Commented:
After some checking around I found a great tutorial at http://www.w3schools.com/aspnet/control_regularexpvalidator.asp

According to the example \d{5} is the right one
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes, that is indeed the correct choice!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now