Skip to content

Instantly share code, notes, and snippets.

@anb
Created April 19, 2011 07:32
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 anb/926967 to your computer and use it in GitHub Desktop.
Save anb/926967 to your computer and use it in GitHub Desktop.
test = "fadslfasd 81.123.233.14 fadslkfjads kterstl adfs 10.10.11.10f sad"
ip = re.findall( r'[0-9]+(?:\.[0-9]+){3}', test )
In [29]: ip
Out[29]: ['81.123.233.14', '10.10.11.10']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment