C# 中的 Backreference constructs函数

首页 / C#入门教程 / C# 中的 Backreference constructs函数

反向引用构造允许随后在相同的正则表达式中识别先前匹配的子表达式。

下表列出了这些构造−

无涯教程网

Backreference construct Description Pattern Matches
\number Backreference. Matches the value of a numbered subexpression. (\w)\1 "ee" in "seek"
\k< name > Named backreference. Matches the value of a named expression. (?< char>\w)\k< char> "ee" in "seek"

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

Service Mesh实践指南 -〔周晶〕

10x程序员工作法 -〔郑晔〕

设计模式之美 -〔王争〕

说透数字化转型 -〔付晓岩〕

说透区块链 -〔自游〕

朱涛 · Kotlin编程第一课 -〔朱涛〕

自动化测试高手课 -〔柳胜〕

Kubernetes入门实战课 -〔罗剑锋〕

零基础学Python(2023版) -〔尹会生〕

好记忆不如烂笔头。留下您的足迹吧 :)