Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6809363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:04:41+00:00 2026-05-26T20:04:41+00:00

hope everything’s great with everyone. can someone please help me to create regexp to

  • 0

hope everything’s great with everyone.

can someone please help me to create regexp to validate the following value format

valid values :

1-24; (1000,125),(1000,125),(1000,125)
1-10; (1000,125)
1-15; (1000,125),(1000,125)

** where the 1-24; should be the range of values to apply; max value should be 24

invalid values :

1-15; (1000,125),
1-50; (1000,125)
1; (1000,125)

thanks guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:04:41+00:00Added an answer on May 26, 2026 at 8:04 pm

    OK, in light of your comment I think I get what you’re asking for. You’re saying that to be valid, the entered value must start with a number between 1 and 24, then a dash, then another number between 1 and 24, then a semicolon and a space, then 1 or more pairs of numbers in brackets. The bracketed pairs should be separated by commas, but no trailing comma.

    Based on that understanding I would suggest a regex something like this:

    /^([1-9]|1\d|2[0-4])-([1-9]|1\d|2[0-4]); (\(\d+(\.\d+)?,\d+(\.\d+)?\),)*\(\d+(\.\d+)?,\d+(\.\d+)?\)$/
    

    Sorry, regarding the “x-y” range at the beginning I’m not aware of a regex method to validate that the second number is greater than or equal to the first. And the numbers in the brackets apparently allow decimal places, but you’ve given only examples, not rules about how many digits, maximum or minimum values or whatever so I’ve just assumed at least one digit followed optionally by a decimal place and at least one more digit.

    I have not tested the above. If anything in the expression doesn’t make sense to you feel free to look at one of the seven zillion regex guides on the web, e.g., http://www.cheatography.com/davechild/cheat-sheets/regular-expressions/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hope someone can help me and not sure if this should be here or
hope someone can help. I have two tables: Users -UserID -UserName UsersType -UserTypeID -UserID
I have a question and I hope someone can help me out. What I
Hope someone can help. I have a simple scenario where clicking checkboxes is driving
I hope there is someone who can help me with this regex content.match(/<div class=content>.+#-#/ig);
I hope you can help me with a problem; first, please don't worry about
hope someone can help with this. I currently have an Add to Cart option
I hope that someone can help me here. I have hunted on and off
Hope someone can help with a bit of a frustrating issue. I have a
hope someone can help. I appreciate there are a few questions that are similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.