x2("", "", 0, 0);
x2("^", "", 0, 0);
+ x2("^a", "\na", 1, 2);
x2("$", "", 0, 0);
+ x2("$\\O", "bb\n", 2, 3);
x2("\\G", "", 0, 0);
x2("\\A", "", 0, 0);
x2("\\Z", "", 0, 0);
n("\\D", "4");
x2("\\b", "z ", 0, 0);
x2("\\b", " z", 1, 1);
+ x2("\\b", " z ", 2, 2);
x2("\\B", "zz ", 1, 1);
x2("\\B", "z ", 2, 2);
x2("\\B", " z", 0, 0);
x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);
x2("()*\\1", "", 0, 0);
x2("(?:()|())*\\1\\2", "", 0, 0);
+ x2("(?:a*|b*)*c", "abadc", 4, 5);
x3("(?:\\1a|())*", "a", 0, 0, 1);
x2("x((.)*)*x", "0x1x2x3", 1, 6);
x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);
n("[0-9-a]", ":"); // PR#44
x3("(\\(((?:[^(]|\\g<1>)*)\\))", "(abc)(abc)", 1, 4, 2); // PR#43
x2("\\o{101}", "A", 0, 1);
+ x2("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbacca", 0, 6);
+ n("\\A(a|b\\g<1>c)\\k<1+3>\\z", "bbaccb");
+ x2("(?i)\\A(a|b\\g<1>c)\\k<1+2>\\z", "bBACcbac", 0, 8);
+ x2("(?i)(?<X>aa)|(?<X>bb)\\k<X>", "BBbb", 0, 4);
x2("(?:\\k'+1'B|(A)C)*", "ACAB", 0, 4); // relative backref by postitive number
x2("\\g<+2>(abc)(ABC){0}", "ABCabc", 0, 6); // relative call by positive number
x2("A\\g'0'|B()", "AAAAB", 0, 5);
x2("a<b>バージョンのダウンロード<\\/b>", "a<b>バージョンのダウンロード</b>", 0, 44);
x2(".<b>バージョンのダウンロード<\\/b>", "a<b>バージョンのダウンロード</b>", 0, 44);
x2("\\n?\\z", "こんにちは", 15, 15);
+ x2("(?m).*", "青赤黄", 0, 9);
+ x2("(?m).*a", "青赤黄a", 0, 10);
x2("\\p{Hiragana}", "ぴ", 0, 3);
n("\\P{Hiragana}", "ぴ");