Koen Aerts wrote:I haven't tried it myself, but did you try to execute the script directly, instead of as an argument to bash; i.e.
The first line in your script already ensures that bash will be used. Also, is your script really in the root directory?
James Sabre wrote:I assume that behind the scenes you are using the JavaMail API to send the email. In which case you need to add a method to your framework that allows you to send a MimeMultipart attachment. There are examples of how to do this in the JavaMail distribution.
Note - JavaMail Base64 encodes binary data which means it only contains ASCII characters.
Rob Spoor wrote:You can make the choice a non-capturing group by starting it with (?: instead of just (. Then put the entire thing in a capturing group:
Now you will only have one group, which is the entire String.
Wouter Oet wrote:What does group(0) return?
Matthew Brown wrote:Get rid of the [...] brackets. They have a special meaning in a regular expression, and they aren't doing what you need here. Replace them with (...).
You should also remove the +, as you only want the month to appear once (e.g. you don't want "JanuaryMarch2011" to validate).
Finally, although it's not necessary, your outer (...) aren't doing anything useful, so you might as well remove them.
Mike Simmons wrote:I think you need to look into the differences between findInLine(), find(), and matches().