Forum Discussion
Naman_65674
Oct 21, 2011Nimbostratus
That actually might be a good idea spark, as i would be able to add the list quite easily.
So if i had a dataclass with:
class error_msgs {
"OP=help"
"OP=token_login"
"OP=error"
"ERR_CODE=0x13212077"
"ERR_CODE=0x132120c8"
"OP=acct_locked"
}
Would it be as simple as:
if { [matchclass $::error_msgs contains [HTTP::header "location"]] == 0 } {
...do something...
}
I got a bit worried reading the matchclass wiki doco, especially:
"And this example will will return the index of the first row containing any of contiguous characters in the string "green" (g, r, e, n, gr, re, ee, en, gre, ree, een, gree, reen, and green will all match):
[matchclass "green" contains $::data_group]"
I only want it to compare on the whole word.....
-- NJ