Forum Discussion
BIG-IP : irule class match with wildcards
This is an old thread, but I've encountered a similar requirement, and am considering the following.: doing a search on the data-group and iterating over the entire list. The keys would be RegEx match strings and the values would be RegEx translation strings. It means that the RegEx compare of the source URL must happen against each returned search item using a RegEx compare. It loses the benefit of the more efficient list searching of class, but still allows storing the match and translation entries in a data-group with any conceivable match or translation rule.
The use case is a generic redirector with 1500+ entries, some of which have strange mapping requirements, i.e.
*.domainA.com/[path1 | path2 ]/index.jsp -> *.domainB.com/path3/index.jsp
*.domainA.com/*/index.jsp -> *.domainB.com/*/index.jsp
where both the hostname and the path have mappings to be done, and we can't enumerate all the possible combinations as explicit rules (we literally don't know what values are legal). Ugly, but not very high volume; mostly used for situations where we acquired a domain and the old function has been split in to two new destinations; we expect them to bookmark the new URL once they are there.
Most of the rules are not nearly that complicated, so perhaps it could be two data groups, one for the 95% case that can do a normal class match ''starts_with' or 'contains', and if that doesn't hit, search the second one for the ugly stuff. The value can be a RegEx translation string in either case; it's the wildcard source that is the problem.
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