freecodecamp: regular expression
How to pass these challenge? I note that snippet code. Help people to help myself.
Regular Expressions - Reuse Patterns Using Capture Groups
"let reRegex = /^(\d+)\s\1\s\1$/; // Change this line"
Use Capture Groups to Search and Replace
"let fixRegex = /good/; // Change this line
let replaceText = "okey-dokey"; // Change this line"
Remove Whitespace from Start and End
"let wsRegex = /\s{2,}/g; // Change this line
let result = hello.replace(wsRegex,''); // Change this line"
Use Capture Groups to Search and Replace
"let fixRegex = /good/; // Change this line
let replaceText = "okey-dokey"; // Change this line"
Remove Whitespace from Start and End
"let wsRegex = /\s{2,}/g; // Change this line
let result = hello.replace(wsRegex,''); // Change this line"
Nhận xét
Đăng nhận xét