lijiarui / lijiarui/nodejs-_study
正则表达式的整理
Open
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
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
}
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.
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.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100