約191件1ページ目

日本語のみで絞り込む

2010/10/17 -A solution is to add captures for the preceding and following text: str.replace(/(.*name="\w+)(\d+)(\w+".*)/, "$1!NEW_ID!$3"). Explanation.

2026/8/10 -To inject the capture groups into the result of a string replacement, you just need to use the "$" character followed by the group's index.

2022/2/2 -Regex groups are super useful when you need to replace specific patterns in strings. In this blog post, discover how to use multiple groups ...

2026/10/26 -If the pattern is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal.

2024/1/27 -Method str.replace(regexp, replacement) that replaces all matches with regexp in str allows to use parentheses contents in the replacement ...

2021/8/27 -The "replaceText" replaced the 1st capturing group with the 3rd capturing group which is simply done with the dollar sign ($). $3 captures ...

2021/3/4 -replace(/([a-z])([A-Z])/g, "$1 $2") ↑ ↑ $1 $2 So if str is “aB”, that matches (lowercase a-z character followed by uppercase A-Z character), ...

Certification: JavaScript Algorithms and Data Structures Course: Regular Expressions Lesson: Use Capture Groups to Search and Replace ...

YouTubeBecoming A Better Dev (with David)

2023/7/13 -(\w+)(\s)(\w+)\2(\w+). in this exercise we have to use capture groups and then replace the string order to 'three two one'.

2024/8/27 -Is it possible to replace each repeated capturing group with a prefix or suffix ? For example add indentation for each line found by the ...