Forum Discussion
Mike_S_64601
Nimbostratus
18 years agoProblem 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]\/" } {
...
18 years ago
TCL uses brackets to denote procedure execution. You'll need to escape the brackets.
when HTTP_REQUEST {
if { [HTTP::uri] matches_regex "^\/\[a-zA-Z\]\[a-zA-Z\]\/" } {
pool pool1
} else {
pool pool2
}
}-Joe