use strict;
my $str = '[XX.Ux("gI\\ny", sl), Ar, XX.Rx("\\t|", pO), Jd, XX.kx("xW\\n", CM), Wm, XX.wx("U\\vyV", DO), jr, XX.Mx("U\\vxW", GO), Zm, XX.tx("a{O", xO), Hm, XX.RV(Qk, Hl, Q0), Qd, XX.Nx("\\t|", OM), Br, XX.zx("{I\\v", vM), jd, XX.gx("U\\vxS", W6), nm, XX.kV(Qk, UM, Q0), Bd, XX.rx("\\t|", RM), Xm, XX.mx("V\\r", kM), Id, XX.dx("J\\t~", KY), Lm, XX.hx("xV\\v", wN), Sd, XX.bx("xU\\x00", d6), rd, XX.Cx("axK", BM), Wd, XX.qx("}~", h6), Zd, XX.sx("gI\\b", b6), Hd, XX.Kx("xU", C6), Lh, XX.Wx("U\\ry", q6), pm["fpValStr"], XX.wV(Qk, Ml, F0), vd, XX.Zx("sH", LN), jm, XX.Hx("{I\\f", jM), Xh], Vh && (Wr.push(XX.nx("xT", XN), XX.Ax("", VN)), Th = j3(N3)), Wr.push(XX.Fx("J\\nu", nY), Md), Kr = ph(j2, [Wr, A0]), Dh = Wr.join(Kr), qr(XX.Ex("9I\\x00", TN).concat(Dh["slice"](N3, W0)));
';
my $regex = qr/XX\.[A-Za-z]*\("(.*)",\s*([0-9A-Za-z]{2})\)/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html