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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:12:24+00:00 2026-05-31T01:12:24+00:00

Sorry in advance if this is a repeat question. I didn’t see it listed

  • 0

Sorry in advance if this is a repeat question. I didn’t see it listed elsewhere.

I’m trying to find a regex string that will recognize a date of birth in the format of mmddyy. As far as I know though, regex doesn’t know where individual number sets begin/end if they’re right next to one another.

Is there a simple way to get regex to find this (WITHOUT requiring delimiters/spacing)?

  • 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-31T01:12:26+00:00Added an answer on May 31, 2026 at 1:12 am

    How about something like:

    ^([0-9]{2})([0-9]{2})([0-9]{2})$
    

    The first group would be two digits for the month, the next group would be two for the day, and the last group would be the year.

    If you wanted to be smarter, you could make sure the first group starts with a 0 or a 1, and the day should start with a 0, 1, 2 or 3. Perhaps:

    ^([0-1][0-9])([0-3][\d])([\d]{2})$
    

    You also might not really need to use RegEx if you don’t want to. Most every single modern framework these days (Python, .NET, Java, whatever) has libraries and methods to parse dates in a specified format. That would have the added benefit of type checking and the ability to build a native Date object as well.

    UPDATE:

    You could use an OR to verify the day doesn’t go over 31:

    ^([0-1][0-9])([0-2][\d]|[3][0-1])([\d]{2})$
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry in advance that this might be a little challenging to read... I'm trying
Sorry in advance everyone for this question as I know the cascading select boxes
Question: Hello All, Sorry that this is kind of a noob question. I just
Sorry in advance as this question is similar (but not the same!) to others.
I'm sorry in advance if this question is flawed. I'm pretty new to databases(I
Ok, this is a pretty unscientific question. Sorry in advance. Any of you using
I am new to web application development, so sorry in advance if this question
Sorry in advance if this is a really basic Matrix/OpenGl question. I have a
Sorry in advance in case this is a stupid question! I was playing around
Sorry in advance for the kind of odd/vague question :). I've come across this

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.