Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Fahimah Khan   on Dec 21 In Asp.net Category.

  
Question Answered By: Hariz Burki   on Dec 21

A RegEx Validator see:


docs.aspng.com/.../webvalidation.aspx#regex

The expression you want is:

^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$

(obtained from RegEx lib a place with a ton of pre-made Regexs (although not all are perfectly tested, this one is good)

Share: