gpt4 book ai didi

aws-cognito - AWS Cognito 中用户名的正则表达式

转载 作者:行者123 更新时间:2023-12-01 10:29:34 30 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Reference - What does this regex mean?

(1 个回答)


4年前关闭。




我正在使用 AWS Cognito 对我的应用程序进行身份验证。根据 AWS Cognito 指南,正确的用户名应遵循如下正则表达式
[\p{L}\p{M}\p{S}\p{N}\p{P}]+
这个正则表达式是什么意思?

最佳答案

此表达式几乎允许输入任何类型的字符,并且必须至少输入 1 个字符。
如果你把这个正则表达式通过 regex101.com ,它会告诉您每个表达式的用途。
所以对于你的:

\p{L} matches any kind of letter from any language.

\p{M} matches a character intended to be combined with anothercharacter (e.g. accents, umlauts, enclosing boxes, etc.)

\p{S} matches any math symbols, currency signs, dingbats, box-drawingcharacters, 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

关于aws-cognito - AWS Cognito 中用户名的正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44179337/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com