正则表达式的整理
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- documentation
Research direction
The issue contains JavaScript RegExp notes covering methods, construction forms, and escaping user input. No file, test, or acceptance criteria is named, so first locate the intended study or documentation file and confirm the desired organization. Done should present the listed material coherently and accurately.
Written by the indexing model from the issue text.
Description
RegExp
exec
test
String
match
replace
search
split
定义方式:
var re = /ab+c/; expression literal
var re = new RegExp("ab+c");
字符串的转义成正则
有些转义用户输入被处理成含有一个正值表达式的字面字符串,这些输入可以被简单的替代值补充完整。
function escapeRegExp(string){
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
}
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lijiarui/nodejs-_study
-
关于JsonRead 的同步异步问题 Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
All issues in lijiarui/nodejs-_study
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·