VB.Net - Backreference Constructs

Advertisements


Backreference constructs allow a previously matched sub-expression to be identified subsequently in the same regular expression.

The following table lists these constructs:

Backreference constructDescriptionPatternMatches
\ numberBackreference. 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"


Advertisements
Advertisements