Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正则表达式 | gauhar blog #12

Open
GauharChan opened this issue Sep 7, 2019 · 0 comments
Open

正则表达式 | gauhar blog #12

GauharChan opened this issue Sep 7, 2019 · 0 comments

Comments

@GauharChan
Copy link
Owner

https://gauhar.gitee.io/2019/09/03/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/

正则表达式 一般用在表单验证 按住ctrl点我啊 作用:​ 用来匹配字符串是否满足一定的规则。 用法:1.先创建一个正则对象 12345// 用构造函数实现let reg = new RegExp('规则')// 另外一种简单的写法 ---> 以字面量的方式创建对象let reg = /规则/; 2.调用方法,看是否满足条件(规律) 12// test方法返回一个布尔值le

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant