Using regex capture group back reference in nested search

@emmanuel or @josh

Is it possible to use a backreference in a nested search within the “find & replace” action?

I am trying to perform a find and replace to update a CID (Inline image) reference within an image tag.

Example showing the CID in the src attribute:

<img width="599" height="155" id="_x0000_i1025" src="cid:image001.png@01D36AC1.68308900" style="width:6.2395in; height:1.6145in">

The below screenshot is where I’m getting the current email body and using a regex to find specific img tags. In the ‘replace by’ I would like to perform a search and use one of the capturing groups as a backreference for the record I want to return.

Here’s the nested “Search for” where I’m trying to use the third capture group as a backreference, but this doesn’t appear to work. Is it possible?

1 Like

You sort of can, but its a little clumsier than your example.

The group reference $3 is out of the regex context. Instead you can put another This Activity's activity.body : find & replace/regex inside the search criteria.