Regular Expressions 101

Community Patterns

1...45678...10

Community Library Entry

0

Regular Expression
Golang

`
^(# Time: (\d+)\s([^ \n]+)\n)?# User@Host: (\w+\[\w+\])\s@\s\[([\d|\.]+)\]\sId: (\d+)\n# Query_time: (\d+\.\d+) Lock_time: (\d+\.\d+) Rows_sent: (\d+) Rows_examined: (\d+)\n((.|\n)*)$
`
g

Description

parse log data

Submitted by anonymous - 4 years ago