News for hackers. Stuff that matters.
Re:Regex Crossword by tlrobinson on Saturday November 29, 2014 @07:18PM (#8675513)
It's a backreference to the first capture group, which is denoted by the first set of parenthesis, e.x.

    (.*)+\1
would match "ABAB", or "ABCABC", etc.

"\2" would match the second capture group, e.x.

    (.*)(.*)\2\1
would match "ABBA", or "AABBBBAA", etc.
Re:Regex Crossword by Edmontonian on Saturday November 29, 2014 @07:37PM (#8675562)
so in your first example, "AB" was in the capture group and the \1 repeats it?
Re:Regex Crossword by tlrobinson on Saturday November 29, 2014 @08:13PM (#8675633)
Correct. The following

    (.*)\1+
Would also match "ABABAB", for example.