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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:54:22+00:00 2026-06-11T18:54:22+00:00

I have to do some pattern matching for text in a textbox. I was

  • 0

I have to do some pattern matching for text in a textbox. I was doing it in postback event of server in C#.
My regex is as follows :

 public bool ValidatePassword(string temp)
    {
        bool isMatch = false;
        passwd = passwd.Trim();

        isMatch = Regex.IsMatch(temp,
                             @"^           # Start of string
                        (?=.*\p{Lu})      # Assert at least one uppercase letter
                        (?=.*\p{Ll})      # Assert at least one lowercase letter
                        (?=.*\d)          # Assert at least one digit
                        (?=.*[^\p{L}\d])  # Assert at least one other character
                        .{8,13}           # Match at least 8 characters and maximum of 13 characters
                        $                 # End of string",
                             RegexOptions.IgnorePatternWhitespace);


        return isMatch;
    }

I want to move this to Javascript so that I do the matching on client side. Can someone help me moving this function to Javascript?

  • 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-11T18:54:23+00:00Added an answer on June 11, 2026 at 6:54 pm

    Something like:

    function ValidatePassword(temp) {
      return /^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[^a-zA-Z\d]).{8,13}$/.test(temp);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have strings of 15 characters long. I am performing some pattern matching on
I am attempting some pattern matching in Lua and have hit a small problem.
I have seen some people in SO commenting that Singleton Pattern is an anti-pattern.
I have a file containing some lines of code followed by a string pattern.
I have an object of some class that obeys the singleton pattern. I need
I am now trying to understand some code and I have found a pattern,
I need some help about RegExp in AS3. I have a simple pattern :
I am doing some self learning about Patern Matching in Javascript. I got a
I have a text file Qfile.txt and the contents are follows, and want to
I have a problem with matching text in Vim buffers. I have a specific

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.