I'm using AWS Cognito for authenticating my application.As per the AWS Cognito guidelines, a proper username should follow the regular expression as follows [\p{L}\p{M}\p{S}\p{N}\p{P}]+ What does this regular expression mean?
This expression allows almost any kind of character and must have at least 1 character to be inputted.
If you put this regular expression through regex101.com, it will tell you what each expression is used for.
So for your one:
\p{L} matches any kind of letter from any language.
\p{M} matches a character intended to be combined with another character (e.g. accents, umlauts, enclosing boxes, etc.)
\p{S} matches any math symbols, currency signs, dingbats, box-drawing characters, etc.
\p{N} matches any kind of numeric character in any script.
\p{P} matches any kind of punctuation character.
'+' Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With