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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:27:04+00:00 2026-06-05T19:27:04+00:00

I used it in C# var validString = new Regex(@^[a-z][a-z\d!@#$%\^&*()\-+]{0,7}$(?<=\d\D+), RegexOptions.Compiled); I am trying

  • 0

I used it in C#

var validString = new Regex(@"^[a-z][a-z\d!@#$%\^&*()\-+]{0,7}$(?<=\d\D+)", RegexOptions.Compiled); 

I am trying to enforce the following rules for password creation

•Not have upper-case letters. 
•Begin with a letter. 
•Have at least 1 digit(s) not at the beginning and end. 
•Have up to 8 alphanumeric 
•Does NOT have any symbols like @#$ characters (symbols like !@#$%^&*()-+). 

Any help would be appreciated

  • 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-05T19:27:05+00:00Added an answer on June 5, 2026 at 7:27 pm

    Almost identical, except for:

    • new RegExp instead of new Regex
    • No @ before the string
    • You can’t use constants for options, only a string with option letters
    • You can’t use lookbehinds.

    Alternatively use a regex literal:

    var validString = /^[a-z](?=[a-z]*[0-9])[a-z0-9]{0,6}[a-z]$/;
    

    Note I changed your regex, since you basically say you can’t have digits at the start or end. I used a lookahead instead to ensure there was a number in there.

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

Sidebar

Related Questions

I have an interface which is being used like this: var descr = new
I used the following function: function datediff() { var dat1 = document.getElementById('date1').value; alert(dat1);//i get
I used following JS code to create equal height columns: var colHeight = Math.max($('.3columngallery
I have used Javascript onlaod like this: function check() { var pic = new
The following script is used to save a file to the desktop: var ba:ByteArray
I used var dp:ArrayCollection = new ArrayCollection(container.GetVotesResult); to get the JSON data from GetVotesResult
I have used this : var watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default); Where Hgh means GPS
I noticed in JQuery that the following code structure is used (function(){var l=this,g,y=l.jQuery,p=l.$,...})() Which
for the longest time now i've used object literals to replace multiple var statements
My code looks like: my %var; my %var_new={}; while(1){ while(my ($k,$v)=each %var){ &a_sub($v); }

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.