Backreference Constructs Home
This page is specific to:.NET Framework Version:1.12.03.03.5Silverlight 34.0
.NET Framework General Reference
Backreference Constructs

The following table lists optional parameters that add backreference modifiers to a regular expression.

Backreference construct Definition
\number Backreference. For example, (\w)\1 finds doubled word characters.
\k<name> Named backreference. For example, (?<char>\w)\k<char> finds doubled word characters. The expression (?<43>\w)\43 does the same. You can use single quotes instead of angle brackets; for example, \k'char'.

Note the ambiguity between octal escape codes and \number backreferences that use the same notation. See Backreferences for details on how the regular expression engine resolves the ambiguity.

See Also

Regular Expression Language Elements

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View