Skip to content

Instantly share code, notes, and snippets.

@virusdefender
Created January 31, 2016 07:06
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 virusdefender/f593cd34282c7876d433 to your computer and use it in GitHub Desktop.
Save virusdefender/f593cd34282c7876d433 to your computer and use it in GitHub Desktop.
find answers
#coding=utf-8
import re
r = re.compile(r'answer="(\w)"')
text = u"""
<div class="row">
<div class="span10">
<p>Remember, the <strong>only thing</strong> before everything, is to have a dogma. A dogma is a list consists by DOs and DONTanswer="C"s. You make it, stick to it while adapt it to reality, question yourself from time to time: is everything on the list mutuallanswer="A"y exclanswer="B"usive and collectively eanswer="B"xanswer="C"hausive?</p>
<p>And there is a meta dogma for dogmas:</p>
<ul>
<li>Avoid emotional tactics</li>
<li>Every kindness counts</li>
<li>Gentleness is the ultimate strength</li>
</ul>
"""
print r.findall(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment