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

请教一个问题 #886

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open

请教一个问题 #886

wants to merge 105 commits into from

Conversation

blachworld
Copy link

var pattern = new RegExp("^" + inputValue, "i"); //获取开头相同的字符串
这个正则没看懂 “,’i‘ ”是什么意思昵?

@loyafenng
Copy link

正则的两个参数,前者是正则表达式,后者是匹配范围。i 是忽略大小写,g 是全文匹配,m 是多行查找。

@mokeLiu
Copy link

mokeLiu commented Dec 7, 2016

创建正则:忽略大小写前提下,匹配以输入字符开头的字符串
//[var pattern = new RegExp()] ==> 创建正则
//"i" ==> 忽略大小写
//"^"+inputVal ==> 以输入字符开头

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

Successfully merging this pull request may close these issues.

4 participants