I’m attempting to strip the user, date, lazyapproval, email address and other things from the Approvers Comment.
Solution:
Do you know of an easier way or the values to enter in to the Regular Expression action? The goal is to return just the comments entered on the approval screen.
Regular expression action 1:
Pattern: ^.*[\S].*[\s]
Mode: Replace text
Replacement text: leave empty
Input text: {Common:LastApproverComments}
Store result in ApproverComments workflow var
Follow by Regular Expression action 2:
Pattern: ^\(.+\)\s
Mode: Replace text
Replacement text: Leave empty
Input text: {WorkflowVariable:ApproverComments}
Store result in ApproverComments workflow var
You can stop here if LazyApproval is disabled. If you are using LazyApproval as well:
Regular Expression action 3:
Pattern: \s*_{7,}
Mode: Split
Input text: {WorkflowVariable:ApproverComments}
Store result in: A collection variable
Finally use a Collection Operation to pull out the first item of the collection.