0
How to use pattern Attribute in HTML5, means what to do if i want to allow only "a-g" letters & want to restrict "h,i,j,k...z".
4 odpowiedzi
+ 18
text.match(/[a-g]*?/gmi)
+ 10
this is used to limit the user input
+ 4
As already suggested, pattern attribute expect a regular expression as filter, so you need to study them ( this is another language, used/implemented in almost programming languages, usefull for string treatments )...
You can find a lot pages about it, regardings differents languages implementations, with google... Mainly, syntax is always same, differing just on some details ( not all advanced features always implemented in example ). In the case of Html, the syntax is the one of JS.
I can recommend a good link, but in french: http://www.expreg.com/memo.php
Else, in english, maybe this one: http://www.regular-expressions.info
+ 1
read regular expression