Similar to the regex response in:
https://community.atlassian.com/forums/Jira-questions/How-can-I-replace-part-of-a-file-path-using-Jira-Automation/qaq-p/2876818
I am trying to send a file path through 'Send web request' in global automation. The file path looks like C:\Users\Company\Person\Documents\Folder\File\Base
When this is processed as {{issue.fields.customfield_10030}} I get an error for \\F as a bad json exit. I have tried to use {{issue.fields.customfield_10030.replaceAll("\\\\F","\\F"}} - which works, but is not robust. When I tried to be more intelligent using regex, I can't seem to get the $1 to work.
{{issue.fields.summary.replaceAll("\\\\([A-Za-z])","\\$1")}} this just makes it a literal $1 and no backslash is processed either: C:$1sers$1ompany$1erson$1ocuments$1older$1ile$1ase.
Ultimately, the root issue is sending the raw \\\\ to json is causing issues. Solving that would be best, but a regex to replaceAll that works would be the next best thing.