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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:59:03+00:00 2026-06-13T19:59:03+00:00

What should be the regular expression to match a repetitive pattern like: AA12/AA/12/BC A/BC/CD/8

  • 0

What should be the regular expression to match a repetitive pattern like:

AA12/AA/12/BC
A/BC/CD/8
A1/1/X/7

Where the first character must be an alphabet, followed by any number of alphanumeric character, followed by the pattern “/X” repeated one or more times where X is alphanumeric character or multiple alphanumeric characters, and at least one repetition should contain a digit.

Valid patterns:

A/B/C/D/1
A/1234/XYSX
PQ123/1
AB/CD1/PQ

Invalid Patterns:

12/AB/34
AB/CD/XY
AB/CD

So far I have come up with :

[A-Za-z]\w*(/\w*[0-9]\w*)+

Which basically says that the later repetitive part should contain a digit, which is not correct as it is fine if only one repetitive part contains a digit..
Can any body help please?

  • 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-06-13T19:59:04+00:00Added an answer on June 13, 2026 at 7:59 pm

    Though certainly not the most beautiful solution, here is one possibility:

    [A-Za-z]\w*(/\w+)*(/\w*[0-9]\w*)+(/\w+)*
    

    Note that I added in two instances of (/\w+)*. Basically I’m just adding in “there can be more occurrences of slash-alphanum that don’t require a digit”.

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

Sidebar

Related Questions

I have a regular expression to match 2 different number formats: \=(?[0-9]+)\?|\+(?[0-9]+)\? This should
I am trying to write regular expression for this pattern: String word=113(112,9); It should
Is there any way that regular expression match inside a if block would interfere
I would like to use a regular expression to match all words with more
Hi I need to create a regular Expression that will match the following pattern:
I'd like a JavaScript regular expression that can match a string either at the
I am looking for a regular expression in C# to match any of these
I would like to use a Perl regular expression to match strings like this:
How do I write a regular expression to match two given strings, at any
Is it possible to write a regular expression which will match any subset of

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.