/    Sign up×
Community /Pin to ProfileBookmark

Regex not workin in Ie7 & 6 – but fine elsewhere

ok heres a regex

/^(?=.*d)(?=.*[A-Z])(?=.*[a-z]).{8,16}$/

which checks I have at least one lowercase letter, one uppercase letter and one number and the string is between 8 and 16 characters.

I have adapted this from another source and it works as intended on all browsers but not IE7 or IE6 (oh microsoft why do you make my life so hard)

Any ideas? (as I dont and am becoming increasingly frustrated with making a site and it not working on IE)

This works fine in all other browsers (IE8 is fine) but doesnt work in IE6 or IE7

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorOct 13.2009 — I am afraid that IE <8 versions do not support the "lookahead" Regexp feature. I guess you should use the test() method sequentially, or something like that.
Copy linkTweet thisAlerts:
@bennystyleeauthorOct 13.2009 — thank you, i got the same reply (see below) but with a code example (for future people who also have this problem)

http://www.codingforums.com/showthread.php?p=875946#post875946
×

Success!

Help @bennystylee spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...