Skip to content

Instantly share code, notes, and snippets.

@miketierney
Created May 7, 2009 17:12
Show Gist options
  • Save miketierney/108206 to your computer and use it in GitHub Desktop.
Save miketierney/108206 to your computer and use it in GitHub Desktop.
/^((\d{1,3}\.){3}\d{1,3})\s/
###
# will find the following IP addresses:
#
# 127.0.0.1
# 192.168.1.105
# 192.168.1.58
# 192.168.1.127
# 10.37.129.2
#
# Note: IP Addresses must have a trailing space at the end (the \s looks for that)
# This is being used to isolate IP Addresses from an Apache log file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment