← GalleryREGEX to parse IIS7 Log File into FluentD✨ Emoji Combos/^(?<date>\d{4}\-\d{2}\-\d{2}\s+)(?<time>\d{2}\:\d{2}\:\d{2}\s+)(?<sip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(?<csmethod>.+?\s+)(?<csuristem>.+?\s+)(?<csuriquery>.+?\s+)(?<sport>\d{1,3}\s+)(.+?\s+)(?<cip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\s+)(?<csUseragent>.+?\s+)(?<scstatus>\d{1,3}\s+)(?<scsubstatus>\d{1,3}\s+)(?<scwin32status>\d+\s+)(?<scbytes>\d+\s+)(?<csbytes>\d+\s+)(?<timetaken>\d+)?$/PCRE+412 years ago✓ Pre-loaded
About this regex
Parses IIS7 W3C extended log file lines into named capture groups for ingestion into FluentD or similar log pipelines. Extracts date, time, server/client IP addresses, HTTP method, URI stem, query string, port, user agent, status/substatus/Win32 status codes, bytes sent and received, and response time. Fields are whitespace-delimited, with the final timetaken value optional at end of line.