Hello, everyone
I'm confused with backreferences for the nested capturing group(s). Can anyone help me out to understand it?
Well, I knew that the following regular expression would match any 2 digits, followed by the exact same two digits:
(\d\d)\1
BUT, how about a nested capturing group? How would it be evaluated?
(\d\d(confused))\2
In the expression (\d\d(\d)), there are two groups:
1.itself, (\d\d(confused))
2.nested group, (confused)
And, *\2* here specifies that is the second pattern (confused) that I want to use for matching? Urr.... totally confused.
Edited by: Jay-K on Mar 10, 2010 3:39 PM