How to use Regex Groups Capturing in I/O Tests?

Hey guys,

Given this question: “Write a program that prints a two-digit number with identical digits (e.g. 11, 22, 77 ect.)”.

I try to set an I/O test that checks if the program prints a two-digit number with identical digits, and I want to use Regex with Groups Capturing (and yes, I know that I can just use 11|22|…|99).

This is a possible program:

class Main {
  public static void main(String[] args) {

I tried these regexes (in the "Expected output" area):

These causes the error: 
"unable to compile regex expression: 
error parsing regexp: invalid escape sequence: `\1`":

But none of them worked… how should I do that?