Add possibility to use regex result in action of collect rules. closes #2695