Created
November 30, 2014 13:39
-
-
Save nfort/318fb5d1a531ba855c42 to your computer and use it in GitHub Desktop.
Extracting information from a log file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$text = "W/dalvikvm( 1553): threadid=1: uncaught exception | |
E/( 1553): FATAL EXCEPTION: main | |
E/( 1553): java.lang.StringIndexOutOfBoundsExceptio | |
E/( 1553): at widget.List.makeView(ListView.java:127) | |
E/( 1553): at widget.List.fillDown(ListView.java:622) | |
E/( 1553): at widget.List.fillFrom(ListView.java:709)"; | |
$pattern = "/([a-z]+\w+).(\w+\.\w+):(\d{3,})./"; | |
preg_match_all("/([a-z]+\w+).(\w+\.\w+):(\d{3,})./", $text, $output_array, PREG_SET_ORDER); | |
print_r($output_array); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment