Regular expressions, matching pattern

Hello,
how can I use groups in a matching pattern?

_00((43)|(34))X. => {
Dial(SIP/${EXTEN}@trunk_out);
}