In a regular expression string, what is used to match a series of characters 4 digits in length, at the end of a line?

Respuesta :

Answer:

\d{4}$

Explanation:

In regular expression, the '\d' is used to match digits (from 0 to 9). The '{4}' simply to denote the number of digits needed to match (in this case, 4 in length). Finally, in order to match at the end of the line, the '

is added.

Therefore the regular expression string for this is

\d{4}$