Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using a regular expression validator to try and validate that the user submits a valid time i.e. nothing over 59 minutes is allowed.

 

I am using the following expression:

(\b[0-9]{0,2}\b)?((\.\b[0-5]{0,1}[0-9]{0,1}\b)?)

 

However, the expression is failing to catch numbers over .59

 

Any suggestions?

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Posted

Solved the problem by trying this: ((\b[0-9]{0,2}\b)?)((\.\b[0-5]{0,1}[0-9]{0,1}\b)?)

 

Mike55.

A Client refers to the person who incurs the development cost.

A Customer refers to the person that pays to use the product.

------

My software never has bugs. It just develops random features. (Mosabama vbforums.com)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...