Skip to content

Instantly share code, notes, and snippets.

@kimmel
Created August 26, 2012 18:05
Show Gist options
  • Save kimmel/3482179 to your computer and use it in GitHub Desktop.
Save kimmel/3482179 to your computer and use it in GitHub Desktop.
ruby regexp html parsing 1
next if content =~ />#{username}</ # skip if we posted it
next unless post.inner_html =~ /vote/ # skip if it's not a post
id = content[/\_(\d+)/,1]
comment_text = (post/'.comment').first.inner_text
commenter = content[/user\?id=(\w+)/,1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment