Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Useful Regular Expressions
(?<ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?<timestamp>.*?)\] "GET (?<request>.*?) (?<httpver>HTTP/1\.\d)" (?<response>\d{3}) (?<response_size>\d{1,}) "(?<referer>.*?)" "(?<client>.*?)"
[0-9a-f]{40} [0-9a-f]{40} (?<name>.*?) <(?<email>.*?)> (?<time>[0-9]*) (?<timezone>[\+\-][0-9]*)\t(?<action>.*?): (?<message>.*)
(?<address>\d+ .*?)(\n|\r|,|-)+(((?<address2>.*?)(\n|\r|,){1,})??)(?<city>.*?)(,| )+(?<state>\w*)(\n|\r|,| )+(?<zipcode>\d{5}-?\d{0,4})
Copy link

donatj commented Aug 31, 2010

Address 2 can be off sometimes, but otherwise it works perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment