Forum Discussion
Parentheses in stream expression
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!
- hoolio
Cirrostratus
... - hoolio
Cirrostratus
If you aren't using variables in the stream expression you can wrap it in curly braces and avoid the need to escape meta-characters: - John_45699
Nimbostratus
Aaron, I tried that, but I still get the same regex compile error. - hoolio
Cirrostratus
Are you using this iRule on multiple virtual servers where some may not have a stream profile enabled? If not, can you skip setting the stream expression in a variable and eval'ing it? - hoolio
Cirrostratus
That's an odd one. Can you try replacing the ( with \x28? This worked in a simplified test on 10.2.3:STREAM::expression {@/sap\x28@/test/sap(/@} or: set stream_expression_cmd {STREAM::expression {@/sap\x28@/test/sap(/@}}
- John_45699
Nimbostratus
Still not working, but now getting the following error: Can't compile regular expression - (/sap(?:) - John_45699
Nimbostratus
Thanks for your help Aaron. It is much appreciated. I was able to make this work on 10.2.3.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com