Click here to Skip to main content
11,721,053 members (81,504 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 ASP.NET C#4.0
I need a regular expression like this
^(?=.*\d)(?=.*[A-Z])(?!.*[\s\\'?>/,"|]).{8,50}$

but it should work on Internet Explorer 6 please....!

need help
Posted 27-Dec-11 20:37pm
Edited 27-Dec-11 20:38pm
Mehdi Gholam285.7K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I ran that through Expresso and it says it is a perfectly valid regular expression.
I can't say it will do what you want it to (because I don't have any idea what you expect it to do), but it is perfectly valid and should work anywhere that a Regex is used.

If it isn't working, what isn't it doing?

Get a copy of Expresso [^] - it's free, and it examines and generates Regular expressions. It may help you to work out why it doesn't appear to be working.
  Permalink  
Comments
Baseer haider at 28-Dec-11 3:21am
   
yes, it is valid because i have already tested it on internet explorer 8 and 9 it is working perfectly but the issue arises in internet explorer 6 can you figure out what I am missing or doing wrong for internet 6 or do you suggest any regular expression which can accept a length of 8 to 50 characters and should have at least one capital letter and a number too but i should work in I.E 6
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Actually in I.E 6 it is not working properly on length i.e.{8,50} so in order to deal with that I use string.Length property now it is working fine on all browsers including I.E 6.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 500
1 OriginalGriff 334
2 Mika Wendelius 160
3 F-ES Sitecore 140
4 Maciej Los 80
0 Sergey Alexandrovich Kryukov 2,199
1 OriginalGriff 959
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540


Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 3 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100