RegexOneLearn regular expressions with simple, interactive examples.
Example 7: Extracting information from a log file
In this example, we are going to use actual output from an Android adb debugging session. Your goal is to use any regular expression techniques that we've learned so far to extract the filename, method name and line number of line of the stack trace (they follow the form "at package.class.methodname(filename:linenumber)").
|Solution||This one can be tricky too, but we really just want to capture the method name, filename, and line number. This can be achieved using the expression '(\w+)\(([\w.]+):(\d+)\)' in which the first capture group is the method, followed by an escaped parenthesis, followed by the filename, a colon, and finally the line number.|