Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jroo
Created February 22, 2009 20:24
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 jroo/68602 to your computer and use it in GitHub Desktop.
Save jroo/68602 to your computer and use it in GitHub Desktop.
extract GAO report ID's from text and return as a list
import re
#extract GAO report ID's from text and return as a list
def extract_gao_id(haystack):
p = re.compile('GAO-\d{2}-?\d{1,4}\w?')
needle_list = p.findall(haystack)
return needle_list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment