SnarlCat
Joined: 26 Oct 2004 Posts: 55
|
Posted: Thu Oct 28, 2004 Post subject: Unordered matching |
|
|
All-
Another question about pattern matching...
How would I go about matching three substrings in an abitrary order? ... the permutations of a set, I suppose.
Example:
Using {foo, bar, snafu}, match URLs such as:
foo-bar-snafu
bar-foo-snafu
foo-snafu-bar
bar-snafu-foo
etc.
I was thinkin' it be similar to ((foo|bar|snafu)?){3}, but this would also match patterns such as foo-foo-foo, which I don't necessarily want.
I'm looking to block URLs that include the HTTP header information (browser, OS, verions, etc).
Thoughts or ideas?
Thanks!
SnarlCat _________________ --
"There are 11 types of people -- those that understand binary, those that don't, and those that think they do." |
|