Questions tagged «capture-group»

2
使用数字搜索和替换RegEx捕获组
我正在尝试使用Visual Studio编辑器正则表达式来查找和替换使用捕获组的文本,但遇到了问题。 我正在尝试找到并捕获一组5个Alpha-Numerics: (\w{5}) 并搜索 - 替换该组以在其后附加“1”: $11 我真的很吝啬 $1 被捕集团 + 1 要追加的文字 例子: 227TW ==> 227TW1 1053X ==> 1053X1 但是,它显然是在解释 $11 作为“Capture Group Eleven”。 如何才能正确地使搜索/替换了解这一点 $1 和 1 是单独的元素? 我试过的事情,失败了: $1(1) : 227TW ==> 227TW(1) $1\1 : 227TW ==> 227TW\1 $1 1 : 227TW ==> 227TW 1 $1^1 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.