Menu

#4 Wrong Evaluation of certain expressions

v1.0 (example)
open
None
5
2013-09-11
2013-09-11
No

Example expression:

((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[@#$%]).{6,20})

(see http://www.mkyong.com/regular-expressions/how-to-validate-password-with-regular-expression/ for details about this expression)

Test-String: AAbb12&

This should not match because & is not an allowed character.

In Java,

"AAbb12&".matches("((?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[@#$%]).{6,20})")

returns false (which is correct),
but QuickREx says the expression matches (see attached screenshot).

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.