在Notepad ++中replaceregexp捕获组?
快速的问题:我有一个正则expression式, ^(?:\b[AZ]+\b\s+)+(.*)\d{8} ,给出了两个捕获组。 我想用空格replace捕获组1。 那可能吗?
如果我replace: \1它replaceTEST TESTER Hello, world. Another word here. 75793250 TEST TESTER Hello, world. Another word here. 75793250 TEST TESTER Hello, world. Another word here. 75793250 – >与Hello, world. Another word here Hello, world. Another word here 。 我想要这个结果: TEST TESTER 75793250 。 用空格replace\1 。
尝试使用:
^((?:\b[AZ]+\b\s+)+)(?:.*)(\d{8})
并replace为:
\1\2
为什么要这么做。
这样做
正则expression式: ^(\b[AZ]+\b\s+)+(?:.*)(\d{8})
replace为: \1 \2