I need to use regex for the username and password for my app. How do declare my regex for a password which must have 8 characters, 1 special character, 1 number, and 1 small and caps letter? In addition, I need to check email with regex ( Gmail, Microsoft or anything)
HI @anglo
Can you try with this Rgular expression in Pattern
"/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*\W)(?!.* ).{8,16}$/"
Regards
Gokul
Try the below patterns:
Password: ^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[\W_]).{8,}$
Email: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
For this password try with this
I tested and it’s working fine
^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$
For reference
And for mail
Try with this pattern
^[\w\.-]+@([\w-]+\.)+[\w-]+$
Hope this helps
Cheers @anglo
I think email works only for gmail account alone,right?
how can i throw error or any text below text box to indicate conditions not satisfying regex in app studio
Cool
I can use here Use Rule: Show message in UiPath apps
Refer this for more details
https://docs.uipath.com/apps/automation-cloud/latest/user-guide/rule-show-message
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.