Fix JAVA_STACK regex consuming trailing spaces
Fix JAVA_STACK regex consuming trailing spaces

- This was breaking tests for exception messages that end with one or
more trailing spaces, as they accidentally get 'stripped' off as part of
the \s special sequence which includes newlines and spaces.
- Instead, use the MULTILINE mode, start the regex with ^ to match each
newline, and then include the EOL at the back with `\r?\n` to ensure
that it is not left behind in the exception string after replacing.

freakboy3742/voc,Felix5721/voc,gEt-rIgHt-jR/voc,glasnt/voc,cflee/voc,gEt-rIgHt-jR/voc,ASP1234/voc,Felix5721/voc,ASP1234/voc,freakboy3742/voc,glasnt/voc,pombredanne/voc,cflee/voc,pombredanne/voc