Mike_S_64601
Apr 11, 2007Nimbostratus
Problem using regexp - syntax error on [
First time attempting to use a regexp in an irule; running into a syntax error in this script:
when HTTP_REQUEST {
if { [HTTP::uri] matches_regex "^\/[a-zA-Z][a-zA-Z]\/" } {
pool pool1
} else {
pool pool2
}
}
I get a syntax error on the expression:
line 2: [undefined procedure: a-zA-Z] [a-zA-Z]
Basically I want to use pool1 if the request path starts with a two-letter directory, and use pool2 if the path starts with anything else.
Is this the best way? What am I doing wrong in the matches_regex syntax?
Thanks for any assistance!