157k views
0 votes
Given the following HTML form snippet of markup, which of the following user inputs would meet the regular expression rule written in the pattern attribute?

User Fran B
by
5.1k points

1 Answer

0 votes

Answer:

Given the regular expression as follows:

[A-Za-z19]{5}

The acceptable input is a code with five characters and each character can consist of uppercase lowercase of alphabet from A-Z or a-z and digit 1 and digit 9. The examples of input that meet the regular expression rule are as follows:

abx11

Acd19

CAD19

Step-by-step explanation:

The characters specified within the square bracket in regular expression are the character sets that meet the rule. A-Z and a-z means all the uppercase and lowercase English alphabet are acceptable. 19 means digit 1 and 9 are part of acceptable character sets. The 5 enclosed by the curly bracket, {5}, means it must have exact five occurrences of characters.

User Chevy
by
4.7k points