parsing Gradle exception messages from a text file
<p>I have a Gradle build exception message like the one below in a text file</p>

<pre><code> "Error code is 1\nCommand line is: output/googlesamples/android-&gt; ActionBarCompat-Basic/head/gradlew --stacktrace -p output/googlesamples/android-ActionBarCompat-Basic/head assembleDebug\n\n\nFAILURE: Build failed with an exception.\n\n\n\n* Where:\n\nBuild file '/...../output/googlesamples/android-ActionBarCompat-Basic/head/Application/build.gradle' line: 12\n\n\n\n* What went wrong:\n\nA problem occurred evaluating project ':Application'.\n\n&gt; Failed to apply plugin [id 'com.android.application']\n\n   &gt; Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper
</code></pre>

<p>Are there any libraries in python which I could make use of to parse this exception message and obtain individual parts of it ? </p>

<blockquote>
  <p><strong>eg:</strong> Error Code, Command line, FAILURE, etc ?.</p>
</blockquote>