Yan, thanks very much for the response.
I didn't realize you could inject your own groovy filter code. I'm not very familiar with groovy at all, but looking at some of the documentation, there's a "matches()" method which supports "patterns" (these are standard regexps I believe?)
http://groovy.codehaus.org/groovy-jdk/java/lang/String.html#matches(java.util.regex.Pattern)
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/regex/Pattern.htmlSo, this actually appears to do what I want (from my limited testing).
and {
c("servtest") {
it.mountPoint.toString().contains("servtest")
}
or {
c(".*serv.*") {
it.mountPoint.toString().matches(".*serv.*")
}
c("/s[ader].*r\$") {
it.mountPoint.toString().matches("/s[ader].*r\$")
}
}
}
The regexps are pretty ugly, but such is the live of a regexp :)
It appears to take all sorts of valid regexps. It looks as though I can put the c() functions in any "and" "or" or "not" block. This appears to be exactly what I need, do you see any "gotchas" with this approach? Or anything that I'm missing?
Thanks again for the response,
Jason