Logsflags: gm
Java Stack Trace Line
Matches a single Java stack trace frame line.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
^\s*at\s+([\w$.]+)\(([^)]+)\)$ (flags: 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
Related patterns
JSON Log Line (Single-Line Object)
LogsMatch a single-line JSON object — typical of structured logging from services like slog, Bunyan, or Pino.
Apache Common Log Format
LogsParses Apache Common Log Format entries.
CloudWatch Log Stream Path
LogsMatch AWS CloudWatch log group / stream paths like `/aws/lambda/my-function` or `/aws/ecs/cluster-name`.
Log Level
LogsMatches standard log level keywords in log lines.