Anthony_Porcano
Apr 15, 2007Nimbostratus
matches_regex and matchclass
Is there any way to apply a regular expression to matchclass? Apologies in advance if I'm missing something obvious here, but my attempts thus far are not working.
if { [ matchclass [HTTP::path] matches_reqex "\/portal\/($::flaggedpaths)\?" ] } {
log local0. "matched [HTTP::path] in flaggedpaths class"
}
Returns:
[invalid option "matches_reqex" must be: contains ends_with equals starts_with] [matches_reqex]
The error seems clear enough. You can only use a subset of the available relational operators with the matchclass command. Am I interpretting this correctly? Is there another way to accomplish pattern matching against a class?
Thanks in advance,
Anthony