E
E
Elena2020-07-24 11:14:41
HTML
Elena, 2020-07-24 11:14:41

Can't you use flags in regular expressions in the pattern attribute?

Something did not find complete documentation about the pattern attribute.
This is how validation works pattern="^[А-ЯЁ][А-ЯЁа-яё]*?-?[А-ЯЁа-яё]+$"
But not like this pattern="/^[А-ЯЁ][А-ЯЁа-яё]*?-?[А-ЯЁа-яё]+$/g"
How to use regular expression flags?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question