• Resolved brianwhitney

    (@brianwhitney)


    I’m using this regex:
    /^(?:[5-9]|(?:[1-9][0-9])|(?:[1-4][0-9][0-9])|(?:500))$/

    Trying to validate that the user enters a number between 5 and 500.

    This works fine at regex101 however, it invalidates all numbers including numbers between 5 and 500.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter brianwhitney

    (@brianwhitney)

    p.s.

    Also doesn’t work without the slashes:

    ^(?:[5-9]|(?:[1-9][0-9])|(?:[1-4][0-9][0-9])|(?:500))$

    Hi @brianwhitney,

    We tried the same RegEx on our end and its working fine as expected.

    Invalides everything which is not in a range between 5 – 500.

    Could you set up a form on your public URL and provide us a URL so that we could debug the issue.

    Thanks.

    Amritansh Trivedi

    (@amritanshatwisetr)

    Closing this thread as there is no reply from the user’s side since last week.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Regex not working’ is closed to new replies.