Forum Discussion
dlg_23340
Apr 01, 2011Cirrus
Operator precedence
I've been looking at the documentation provided on iRule operators in the wiki, and the operator precedence for the F5-added operators is not listed. Is this information available anywhere?
6 Replies
Sort By
- Hi dlg,
- I don't have any specific scenarios I'm concerned about right now, but it's always nice to be able to point to actual documentation to explain why my code is correct.
- For clarity's sake, I mean the following operators from the aforementioned link:
Operand Description
contains Tests if one string contains another string
ends_with Tests if one string ends with another string
matches_glob Implement glob style matching within a comparison
matches_regex Tests if one string matches a regular expression
The other operators, as hoolio pointed out, map to existing TCL operators, which are sorted in order of precedence.
- I think they'd fit in somewhere around the other string operators like eq/ne. Regardless, if you have any doubts, you can always use parentheses to make the precedence explicit:
- Yes, I understand that I can add parentheses until I get the behavior I want. But I would like to have The Official Word all the same.
- You could open a case with F5 Support to get the official view from F5. But I'm still not sure how it really matters whether contains takes precedence over ends_with etc. Can you explain exactly what you're trying to figure out?
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects