and more in a single search tool across platforms. Read the announcement here. |
01/10/2024 01:21 AM - edited 01/10/2024 01:21 AM
Requirement:
1. Best practice is to include alpha, numeric and special characters, upper-case and lower-case
characters.
2. password should be created with a pre-fix of $0 and exclude uppercase and lower case I O L as well as exclude the following special characters ^, <, &, >, ", %, $, #, {, }, (, )
Can you please help with a working regex for this.
01/10/2024 03:31 AM - edited 01/10/2024 03:31 AM
Hi @Diptansu11
^(?!.*[IiOoLl^<\&>"%$#{}()])[A-HJ-N-Za-hj-n-z0-9]{2}\$0.*$
If this works , please mark this as the solution.
01/10/2024 03:48 AM
In this regex where we are setting the "pre-fix of $0" part ?
01/10/2024 08:16 PM
^\$0[A-HJ-NP-Za-km-z0-9!@*?&]*$
02/19/2024 06:01 PM
@Diptansu11 Is this issue resolved ?
01/10/2024 03:50 AM
Hi @Diptansu11 - I have made the part bold which sets the prefix.
^(?!.*[IiOoLl^<\&>"%$#{}()])[A-HJ-N-Za-hj-n-z0-9]{2}\$0.*$
^ asserts the start of the string.
(?!.*[IiOoLl^<\&>"%$#{}()]) is a negative lookahead ensuring that the characters you want to exclude are not present in the password.
[A-HJ-N-Za-hj-n-z0-9]{2} matches any combination of two characters except the excluded ones.
\$0 ensures that the password starts with $0.
.* matches any characters that follow.
$ asserts the end of the string.
Thanks.
01/10/2024 08:51 PM
@Diptansu11 validate this
^\$0[A-HJ-NP-Za-km-z0-9!@*?&]*$