On 11.12.2014, at 01:40, Rob D <
robds...@gmail.com> wrote:
> Please tell me what I am doing wrong.
From
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html, emphasis mine:
> • The matches method attempts to match the __entire input sequence__ against the pattern.
> • The find method scans the input sequence looking for __the next subsequence__ that matches the pattern.
Since `txt` is clearly not the string 'Cs', it doesn't _match_.
Using something line /.*Cs.*/ may be an option for you, like the examples on
https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin do it.
General troubleshooting hint: Try to remove as many components as possible from your problem to determine where the problem lies. In this case, a simple standalone Groovy script would have demonstrated that the problem has nothing to do with Groovy Postbuild, or Jenkins even.