I\'m pretty sure regular expressions are the way to go, but my head hurts whenever I try to work out the specific regular expression.
What regular expression do I ne
I usually use this applet to experiment with reg. ex. The expression may look like this:
if (str.matches("(?i)^.*?(WARNING|ERROR).*?parsing.*$")) { ...
But as stated in above answers it's better to not use reg. ex. here.