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

The Archive Base Latest Questions

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

I’m looking for a regular expression to use with an ASP.NET Regular Expression Validator

  • 0

I’m looking for a regular expression to use with an ASP.NET Regular Expression Validator control to check for the following format:

08/10/11 23:00

It must be MM/DD/YY HH:mm using a 24 hour clock. Thanks in advance for any help!

  • 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:52:57+00:00Added an answer on May 26, 2026 at 8:52 pm

    This matches your spec, albeit a bit flexible.

    /^(?:0?[1-9]|1[012])/(?:0?[1-9]|[12]\d|3[01])/(?:\d\d)\s+(?:[01]?\d|2[0-3]):(?:[0-5]\d)$/
    

    You can customize it to your needs I guess.

    Explanation:

        "
    ^              # Assert position at the beginning of the string
    (?:            # Match the regular expression below
                      # Match either the regular expression below (attempting the next alternative only if this one fails)
          0              # Match the character “0” literally
             ?              # Between zero and one times, as many times as possible, giving back as needed (greedy)
          [1-9]          # Match a single character in the range between “1” and “9”
       |              # Or match regular expression number 2 below (the entire group fails if this one fails to match)
          1              # Match the character “1” literally
          [012]          # Match a single character present in the list “012”
    )
    /              # Match the character “/” literally
    (?:            # Match the regular expression below
                      # Match either the regular expression below (attempting the next alternative only if this one fails)
          0              # Match the character “0” literally
             ?              # Between zero and one times, as many times as possible, giving back as needed (greedy)
          [1-9]          # Match a single character in the range between “1” and “9”
       |              # Or match regular expression number 2 below (attempting the next alternative only if this one fails)
          [12]           # Match a single character present in the list “12”
          \d             # Match a single digit 0..9
       |              # Or match regular expression number 3 below (the entire group fails if this one fails to match)
          3              # Match the character “3” literally
          [01]           # Match a single character present in the list “01”
    )
    /              # Match the character “/” literally
    (?:            # Match the regular expression below
       \d             # Match a single digit 0..9
       \d             # Match a single digit 0..9
    )
    \s             # Match a single character that is a “whitespace character” (spaces, tabs, line breaks, etc.)
       +              # Between one and unlimited times, as many times as possible, giving back as needed (greedy)
    (?:            # Match the regular expression below
                      # Match either the regular expression below (attempting the next alternative only if this one fails)
          [01]           # Match a single character present in the list “01”
             ?              # Between zero and one times, as many times as possible, giving back as needed (greedy)
          \d             # Match a single digit 0..9
       |              # Or match regular expression number 2 below (the entire group fails if this one fails to match)
          2              # Match the character “2” literally
          [0-3]          # Match a single character in the range between “0” and “3”
    )
    :              # Match the character “:” literally
    (?:            # Match the regular expression below
       [0-5]          # Match a single character in the range between “0” and “5”
       \d             # Match a single digit 0..9
    )
    $              # Assert position at the end of the string (or before the line break at the end of the string, if any)
    "
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.