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 3999298
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:38:22+00:00 2026-05-20T07:38:22+00:00

I want to implement the following validation. Match at least 5 digits and also

  • 0

I want to implement the following validation. Match at least 5 digits and also some other characters between(for example letters and slashes). For example 12345, 1A/2345, B22226, 21113C are all valid combinations. But 1234, AA1234 are not. I know that {5,} gives minimum number of occurrences, but I don’t know how to cope with the other characters. I mean [0-9A-Z/]{5,} won’t work:(. I just don’t know where to put the other characters in the regex expression.

Thanks in advance!

Best regards,
Petar

  • 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-20T07:38:22+00:00Added an answer on May 20, 2026 at 7:38 am

    Using the simplest regex features since you haven’t specified which engine you’re using, you can try:

        .*([0-9].*){5}
        |/|\   /|/| |
        | | \ / | | +--> exactly five occurrences of the group
        | |  |  | +----> end group
        | |  |  +------> zero or more of any character
        | |  +---------> any digit
        | +------------> begin group  
        +--------------> zero or more of any character
    

    This gives you any number (including zero) of characters, followed by a group consisting of a single digit and any number of characters again. That group is repeated exactly five times.

    That’ll match any string with five or more digits in it, along with anything else.

    If you want to limit what the other characters can be, use something other than .. For example, alphas only would be:

    [A-Za-z]*([0-9][A-Za-z]*){5}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement following logic in my SQL query: If some date is
i want to implement the following exhaustive match, but i can't figure out to
I want to implement following layout: This works great for fixed margin between Icon(Circle)
I want to implement the following constraints in mysql: create table TypeMapping( ... constraint
i want to implement the following behaviour: if the users browser-language is e.g. EN
I want to implement the following scenario: When a user presses the Home key
I want to implement the following combobox in ExtJS. The question is, how to
I want to implement the following page by Asp.net version 4.0 and ajax but
If I want to implement the following code, would enums be appropriate? I've looked
I am new to multi-thread programming, I want to implement the following functionality. There

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.