Question: Javascript: Hello, guys could you tell me how to make this expression? 1) Course code is mandatory and should have the following pattern (140XXXXX-X) where

Javascript:

Hello, guys could you tell me how to make this expression?

1) Course code is mandatory and should have the following pattern (140XXXXX-X) where X is a digit (0-9)

- I tried : if (document.getElementById("CourseCode").value.search(/^(140\d{8})$/) != 0)

but It didn't work :(

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!