I have a few strings that look like the following:
xml=<data><optional><Account>192</Account></optional></data>, submitter=Q102, target=Q10, escalationType=esc, escalationReason=277, feedback=cx req live esc to have us review, adv cx his account is pending, preventable=0,
What I am trying to do is write a regular expression in excel (vb) to find all the text between feedback= and , preventable and replace all , in that with a PIPE instead.
This is the expression I have so far to find that text:
(?<=feedback=)(.*)(?=, preventable)/gi
However, I'm not too sure what to do at this point to replace text within that selection?
Here is the expected string after it has ran:
xml=<data><optional><Account>192</Account></optional></data>, submitter=Q102, target=Q10, escalationType=esc, escalationReason=277, feedback=cx req live esc to have us review| adv cx his account is pending, preventable=0,
Here is a link to the Regex I am working with in my test: https://regex101.com/r/wR1dL0/2
.+?there. But, normally when you want to do two separate things in a single replace function, you would use a callback functionality. For example, in the replacement portion, specify a function that returns a replacement. In that function, take all from capture group 1, replace, -> |, then return the result.