Former Member
Feb 01, 2016how to match "\w" with -glob to avoid using -regexp
Hi team,
I need help with iRule to filter URLs.
I want to match: /some/path/only_words-XXX or /some/path/only_words-XXXX (and everything below)
XXX and XXXX are numbers (length 3 or 4), "only_words" are any word character plus the "_" sign (or \w in regexp) and also I want the "-" sign.
Now in apache httpd I'm doing this with regexp:
RewriteCond %{REQUEST_URI} /some/path/\w+-\d{3,4}(/?).*
As regexp is not recommended I wonder how to do this using "switch -glob [HTTP::uri]"
"/some/path" is always the same.
Please advice.
Thanks