Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
2 replies
Subscribers
7 subscribers
Views
4155 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am making use of the following expression =regexmatch("((?=.*\\d)(?
bhanuprakashg
over 11 years ago
I am making use of the following expression
=regexmatch("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,})",ri!specifiedPassword)
to check whether the specified string contains atleast one lower case,one upper case, one numerical,one special character and has length of atleast 6 characters. Everything works fine except for one lower case and one upper case validations. The expression returns true for both "welcome@123" and "WELCOME@123"
...
OriginalPostID-67691
OriginalPostID-67691
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 11 years ago
It seems the issue is the flag the author of this plug-in is passing in compile() method:
Pattern p = Pattern.compile(pattern, 34);
your expression works fine if the compiled with the default:
Pattern p = Pattern.compile(pattern);
if I modify the regexmatch() method to use no flag, it correctly returns "False" for "welcome@123" and "WELCOME@123" but will return true for "WeLCOME@123"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 11 years ago
I couldn't find what that 34 means though, it doesn't seem to be one of the constants within the Pattern class
docs.oracle.com/.../Pattern.html
, int)
You can adapt this plugin to use Pattern.compile(pattern) instead to be able to use it for your requirement
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel