$re = '/\w*.\w*.\w*\(\)/m';
$str = '21:18:19 at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:170)
21:18:19 at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
21:18:19 at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:92)
21:18:19 at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
21:18:19 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
21:18:19 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
21:18:26 2016-05-12 21:18:25.238 [ERROR] (1): Failed to find the annotation and the status of the test public void com.somename.qa.mobile.tests.somename.SomeTest.testSomeName(). The result is not deployed to Platform but we will proceed with further tests
21:18:26 somename.client.test.utilities.Platform.PlatformApiException: Platform API returned HTTP 400("Field :case_id is not a valid test case.")
21:18:26 at somename.client.test.utilities.platform.PlatformApiClient.sendRequest(PlatformApiClient.java:197)
21:18:26 at';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php