Forum Discussion
Cosby_17532
Feb 23, 2011Nimbostratus
Using wildcards with classes
I'm in desperate need of help with an iRule for a customer. They are converting a working 9.x rule to 10.x. In the process we changed it from an array to a class. The class calls an external file w...
hooleylist
Feb 24, 2011Cirrostratus
Yep, so for any exact match like /petfriendshhop/, you'd add it to the exact match datagroup and use the equals operator. For a URI token that has a * on the end, you'd add it without the * to a "starts_with" datagroup and use the "starts_with" operator on class match. Similarly, if you had ends_with checks you wanted to do, you could use the same logic as starts_with. If you need to support wildcards in the middle of strings in the datagroup, you'd need to retrieve the entire datagroup as a TCL list using 'class get' and then loop through the entries one by one using 'string match'.
Aaron
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