Anda di halaman 1dari 1

1-only for numbers---\d{0,9}

2-for five digits only---\d{5}(-\d{4})?

3-total no. of digits is 4---\d{4}

4(a)-to store price like---^\d{0,}[.]\d{0,}$---(ex-23.90)


4(b)-to store price like---^\d*\.?\d*---(ex-23.90 or 23 also)

5-to store price like---\d{0,9}.\d{0,9}---(all price with(but also taking a single


character))

6-to store only alphabets---[a-za-z]{0,}-----(city like)

7-to give required field validator to drop down list->a-control to validate-ddl id


b-error message
c-operator-not equal
8-to restrict number of characters in a
textbox(from 6-20(here))-validation expression-^[a-za-z\d]{6,20}$

9-to restrict space (regular expression validator)-\w+([-+.']\w+)*

Anda mungkin juga menyukai