Question: Javascript: This regular expression accepts ID numbers from a hypothetical company: /^[BQ]d{2}-d{4,6}$/ Explain in words what this regular expression does. Write a JavaScript script that

Javascript:

This regular expression accepts ID numbers from a hypothetical company:

/^[BQ]\d{2}-\d{4,6}$/ 
  1. Explain in words what this regular expression does.
  2. Write a JavaScript script that tests this regular expression. Provide test strings that test all cases.

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!