更新时间:2021-10-23 23:19:32
回复:
我需要一个正则表达式模式到
检查
字母数字(a-zA-z0-9)的字符串,并且
还包含下划线,hypen和点
I need a regular expression pattern to check a string for alphanumeric(a-zA-z0-9) and also can contain underscore, hypen and dot
模式将是[_ a-zA-Z0-9 \\-\\。] +
请注意双反斜杠,因为这首先被解释为Java字符串,反斜杠需要保持原样不变。
Note the double-backslashes, since this is first interpreted as a Java string and the backslashes need to stay intact for the regex.