Robert_47833
May 10, 2011Altostratus
confused by match_regx
Hi,can someone help?
when HTTP_REQUEST
{ default vars set in most iRules written by StubHub
set host [HTTP::host]
set uri [HTTP::path]
set subdomain1 "static"
set subdomain2 "s"
if { $host matches_regex "^$subdomain1.|$subdomain2." and ($uri matches_regex "(jpg|bmp|gif|png|img|ico|js|css|swf|swz|vbs|html|htm|csv|txt|crossdomain.xml)$")}
{ if { $uri matches_regex "^/(cswebtool|cobrands|jsrs|overflow|promotions|data|resources)" }
{ persist none
pool SRWD25-STATIC return
}
}
else { xxxxx
Now I visit
Will this match pool ddd25-STATIC
Because in my opinion,
$host matches_regex "^$subdomain1.|$subdomain2."
so it should be static.|s because "|" is contained by ""
the operator "|" means "or" or only a string?
confused again