Forum Discussion
John_45699
Nimbostratus
Mar 14, 2012Parentheses in stream expression
I need to search for and replace a string that includes a "(". Whenever I try this, I get a regex compilation error because the parentheses are not balanced. How do I make this work?
Here is my stream expression. I'm stuck and appreciate any help that I can get.
set stream_expression_cmd "STREAM::expression \"@/sap(@/test/sap(/@\""
7 Replies
- Jeff_Maddox_394Historic F5 Account
The "!" (not) operation needs to negate the statement "uri equals something". Put the statement in parentheses with the "!" outside as follows: { !([HTTP::uri] equals "/about-*****/investor-relations") }
Also, try contains "investor-relations"
OR
matches_glob "/about-*/investor-relations"
"equals" expects the literal "*" character
- Mary_G_147416
Nimbostratus
Hi Jeff, Thanks for the help. I tested adding the parentheses with the test vip and what you suggested works! I'm waiting on approvals to try it on the production vip again, will update as soon as that works too.
have a good day!