cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reg-X Question

bob_zins
Helper

In DC RUM, I'm trying to write a reg-x that will remove a portion of the middle of a URL.  The Reg-x is matching, however the entire URL is being reported to the CAS.

Here is the reg-x: (https://riportal.zurichna.com/wps/mycontenthandler)..[^\*]*.(/favicon.ico)

Here is the URL: 

https://riportal.zurichna.com/wps/mycontenthandler/!ut/p/digest!c140c8qa4mh6pkz8lttjcq/res/.riskinte...

 

I expect the portion in between the sets of parentheses to be drop or not reported to the CAS. What's wrong with my reg-x 

3 REPLIES 3

josh_cooper
Inactive

Good to talk to you again, Bob!  I think we've worked together in the past a bit.  We had the same issue with trying to exclude the dynamic session variable here, but I'm having trouble finding the exact software service we were having trouble with - I found a similar one though: 

(https://mywebsite/kb/session/).*(resume/idp/prp.ping)

So based on what works here, try:

(https://riportal.zurichna.com/wps/mycontenthandler/).*(favicon.ico) -

I remember spending hours on it, and it turned out that it just didn't like the slash to be on the other side.

 

Bob, Josh - actually both regular expressions should work in this case.

Have you checked them using "Extended regular expression test" tool from RUM Console? See results for those regular expressions below:

 

Does the problem only occurs for resources like favicon.ico? A potential explanation here could be that since favicons' content-type is not on the "active-content-type" list. Can you disable content-type checking for this URL and see if that helps? 

 

josh_cooper
Inactive

You might be right - I know in our case, having the slash in the second return value wouldn't return values correctly, even though the checker showed that it would work.  There seems to be a disconnect between the Regex verification tool and the way regex actually gets processed on the AMD.