4

I have a regex rule and an action that returns a file from a local cache. The rule captures what I want it to, but the problem is $2 in the action is not handled, so Fiddler tries to return D:\path\$2 (and fails). What could be wrong?

Rule:

regex:(?insx).*(host1.com|host2.com)/folder1/folder2/(.*)\?rev=.*

Action:

D:\path\$2

Any help would be appreciated.

P.S. I'm using Fiddler v2.4.8.0

user2286759
  • 189
  • 13

2 Answers2

6

After loosing an interesting amount of hair with this, I achieve it 'naming' the group replacement, like this:

Rule:

regex:(?insx).*(host1.com|host2.com)/folder1/folder2/(?'mygroup'.*)\?rev=.*

Action:

D:\path\${mygroup}
John Bernardsson
  • 1,751
  • 1
  • 17
  • 19
1

When you're using group replacements like this, it's important to put ^ at the front of the Rule expression and $ at the end.

EricLaw
  • 56,563
  • 7
  • 151
  • 196