When using perl to match strings, you would quite often do something like:
if ($message =~ /value/) { print $message }
In java regular expressions such as used by String.matches have to match the whole string, so you would do
if (message.matches(".*value.*")) { System.out.println(message) }
Now, what happens if you do
if ("foo\nsome value
(
Read more... )