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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:42:48+00:00 2026-05-12T07:42:48+00:00

I understand regular expressions reasonably well, but I don’t get to make use of

  • 0

I understand regular expressions reasonably well, but I don’t get to make use of them often enough to be an expert. I ran across a regular expression that I am using to validate password strength, but it contains some regex concepts I am unfamiliar with. The regex is:

^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$

and in plain English it means that the string must contain at least one lowercase character, one uppercase character, and one number, and the string must be at least six characters long. Can anyone break this down for me to explain how this pattern actually describes that rule? I see a start of string char ^ and an end of string char $, three groups with lookaheads, a match any character . and a repetition {6,}.

Thanks to any regex guru who can help me get my head around this.

  • 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-12T07:42:48+00:00Added an answer on May 12, 2026 at 7:42 am

    Under normal circumstances, a piece of a regular expression matches a piece of the input string, and “consumes” that piece of the string. The next piece of the expression matches the next piece of the string, and so on.

    Lookahead assertions don’t consume any of the string, so your three lookahead assertions:

    • (?=.*\d)
    • (?=.*[a-z])
    • (?=.*[A-Z])

    each mean “This pattern (anything followed by a digit, a lowercase letter, an uppercase letter, respectively) must appear somewhere in the string”, but they don’t move the current match position forwards, so the remainder of the expression:

    • .{6,}

    (which means “six or more characters”) must still match the whole of the input string.

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

Sidebar

Related Questions

I understand PCRE pretty well, but MySQL's regular expression flavor seems to get the
I don’t understand or see the need for regular expressions. Can some explain them
I really don't understand regular expressions and was wondering what the following regular expressions
There is something I don't understand in Java's regular expressions. I have the following
I'm studying Regular Expressions by reading Aho's book. I don't understand two of the
I am not new to regular expressions and I use them all the time.
I would like to use the regular expressions in Python to get everything that
For some time I've been trying to understand regular expressions in JavaScript, but it
This appears to be strange behavior, or perhaps I don't understand regular expressions so
I'm trying to learn Regular Expressions but I can't understand how to set 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.