Logsflags: gm

Java Stack Trace Line

Matches a single Java stack trace frame line.

Try it in RegexPro

Pattern

regexJavaScript
/^\s*at\s+([\w$.]+)\(([^)]+)\)$/gm

Raw source: ^\s*at\s+([\w$.]+)\(([^)]+)\)$

How it works

`^\s*at\s+` matches the indent and 'at' keyword. `([\w$.]+)` captures the fully-qualified method. `\(([^)]+)\)$` captures the source location.

Examples

Input

at com.example.MyClass.method(MyClass.java:42)

Matches

  • at com.example.MyClass.method(MyClass.java:42)

Common use cases

  • Error triage
  • Stack trace parsers
  • JVM observability