Question: Suppose I have a regular expression for detecting the format of a postal code in a variable postalRegEx and the postal code field is loaded

Suppose I have a regular expression for detecting the format of a postal code in a variable postalRegEx and the postal code field is loaded into a variable postalCode. Which of the following statement is TRUE when the postal code is valid?
Question 12Answer
a.
(postalCode.value.search(postalRegEx)==0)
b.
(postalCode.value.match(postalRegEx)==-1)
c.
(postalCode.value.match(postalRegEx)== true)
d.
(postalCode.value.search(postalRegEx)==-1)
e.
(postalCode.value.search(postalRegEx)== true)
f.
(postalCode.value.match(postalRegEx)==0)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!