Skip to content

Instantly share code, notes, and snippets.

@zeuxisoo
Created August 26, 2011 09:47
Show Gist options
  • Save zeuxisoo/1173084 to your computer and use it in GitHub Desktop.
Save zeuxisoo/1173084 to your computer and use it in GitHub Desktop.
Python re module grep current number (3 Person column) on public house
print int(''.join(
re.compile(
r'<td class="componentBlack" nowrap="nowrap" align="right">(.*?)</td>'
).search(
re.compile(
r'<td class="componentBlack" nowrap="nowrap" align="right">.*?</td>',
re.MULTILINE
).findall(open('test.html', 'r').read())[4]
).group(1).replace("&nbsp;", " ").split(" ")
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment