提交 8d79a4f2 编写于 作者: RunAtWorld's avatar RunAtWorld

正则表达式基础

上级 0819e401
......@@ -227,7 +227,7 @@ str.replace(reg,"--$1--"); //"--asd123--asd123"
- 由数字、26个英文字母或者下划线组成的字符串:`^\w+$ 或 ^\w{3,20}$`
- 中文、英文、数字包括下划线:`^[\u4E00-\u9FA5A-Za-z0-9_]+$`
- 中文、英文、数字但不包括下划线等符号:`^[\u4E00-\u9FA5A-Za-z0-9]+$ 或 ^[\u4E00-\u9FA5A-Za-z0-9]{2,20}$`
- 可以输入含有^%&',;=?$\"等字符:`[^%&',;=?$\x22]+`
- 可以输入含有 ^%&',;=?$“ 等字符:`[^%&',;=?$\x22]+`
- 禁止输入含有~的字符:`[^~\x22]+`
------
......@@ -306,5 +306,5 @@ str.replace(reg,"--$1--"); //"--asd123--asd123"
1. [Java 正则表达式](https://www.runoob.com/java/java-regular-expressions.html)
2. [正则表达式 - 语法](https://www.runoob.com/regexp/regexp-syntax.html)
3. Regex 正则表达式中几个符号([ ] ^ {} ?: ?= ?!)的概念 . https://www.jianshu.com/p/9c4979a3b7e4
4. 正则表达式——“?”的几种用法 https://blog.csdn.net/qq_37683835/article/details/88601721
\ No newline at end of file
3. [Regex 正则表达式中几个符号的概念](https://www.jianshu.com/p/9c4979a3b7e4)
4. [正则表达式——“?”的几种用法](https://blog.csdn.net/qq_37683835/article/details/88601721)
\ No newline at end of file
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册