Regex to check entry -


I'm terrible at regex and how to know how much value 1 or 2 is in a selection, No more

There are three options and only 2 are valid.

It can be used as validation regex for jQuery validation.

If you want to match the literal string "1" and "2", < / P>

  / ^ [12] $ /   

will suffice.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -