Skip to content

Instantly share code, notes, and snippets.

@MauricioRoman
Created October 24, 2015 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MauricioRoman/dc305d0cbaab929b86bd to your computer and use it in GitHub Desktop.
Save MauricioRoman/dc305d0cbaab929b86bd to your computer and use it in GitHub Desktop.
regex to parse empty nginx logs
regex = "(?P<ipaddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(.+)(?P<dateandtime>\d{2}\/[a-zA-Z]{3}\/\d{4}:\d{2}:\d{2}:\d{2})(.+)(?P<statuscode>\d{3})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment