Jump to content
Sign in to follow this  
forthekill

Trying to construct a pattern restriction

Recommended Posts

I want to specify a type as being an array of values, all comma seperated.The first number x in the array is the number of pairs of points.Then, there will be x number of pairs (the numbers in each pair cannot exceed 10000), with a maximum of 500 pairs.For example, the array might read:4,100,100,25,100,30,30,254,200I am having trouble figuring out the correct pattern for validation.So far I have:pattern value ="[0-10000]{1}(,[1-10000],[1-10000]{1,500})?"but that doesn't seem to work. I know it isn't quite right but I can't quite decipher the specification explanation of the pattern restriction to make it work.Also, if the tag was blank, it must also be a valid value.Can anyone help?

Share this post


Link to post
Share on other sites

Does anyone know of a place where the pattern restriction is explained in a manner that makes sense? Everything I've seen so far talks about real simple patterns, but doesn't really explain how to use the expressions.

Share this post


Link to post
Share on other sites

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.

Loading...
Sign in to follow this  

×
×
  • Create New...