The pattern attribute
The pattern attribute is unique to input elements and especially to those of type text. Inside you can write your regular expression pattern.
Bear in mind that the / / backslashes are not accepted and not used since there is no way to add modifiers. There is no official way to ignore case sensitivity, check for global matches or multiline results. Thus it would be really recommended not to be used heavily, except for easy patterns, and for most of the cases, it is recommended JS should be used as an alternative for pattern.