You can use back references. Basic example:
Code:
if $regex(some stuff here,/(stuff.*)/) { echo -a captured: $regml(1) }

If you give a concrete example, this could be improved smile