There are enhancements in 11.51 around this area. Refer to following extract from ReadMe.
- An argument has been added to the web_reg_save_param_xpath API that instructs the query to return the entire content of the selected node, and not just its value.
- The web_reg_save_param_regexp API now allows you to enter multiple capture groups in the regular expression and specify which capture group to save.You can also now save the entire matched expression.