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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:47:27+00:00 2026-06-03T23:47:27+00:00

I am newbie in Regular Expressions. I need to check this time 18:00(00:00, 01:00,

  • 0

I am newbie in Regular Expressions.

I need to check this time 18:00(00:00, 01:00, 05:12, any time of this format) by regexp, is it correct or no.

Here is my variant:

/[0-9][0-9]:[0-9][0-9]/

Can I change [0-9][0-9] to something like 2*[0-9] ???

  • 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-03T23:47:30+00:00Added an answer on June 3, 2026 at 11:47 pm

    If you specifically want to match 18:00 you should use /^\d{2}:\d{2}$/. The answers provided so far will match aaa12:99ddd. The ^ and $ are anchors and will instruct the regex to match specifically the given string.

    If you are after a 24 hour validation regular expression you could use this: /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/ (taken from here).

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

Sidebar

Related Questions

I am newbie in ruby and regular expressions and I have this function write
I'm a newbie with regular expressions and i need some help :). I have
I'm a newbie to regular expressions and I have the following string: sequence =
I'm a regular expression newbie and I can't quite figure out how to write
I was reading about regular expressions (I'm a regex newbie, but want to learn
I'm kinda a newbie at regular expressions, so would appreciate a bit of peer
I'm not new to Python but a complete newbie with regular expressions (on my
I'm just learning Python, and I can't seem to figure out regular expressions. r1
i am sorry i am a newbie of regular expression. i searched this match
Sorry for the dummy question but I'm a regular expressions newbie. I want these

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.