title: How to search for matched string then extract the string after it and a colon
body: <p>I'm new to Python and web scraping so I apology if the question is too basic!</p>
  
  <p>I want to extract the "score" and "rate" (rating) from the following example BeautifulSoup object   </p>
  
  <pre><code>import bs4
  import re
  text = '&lt;html&gt;&lt;body&gt;{"count":1,"results":[{"score":"2-1","MatchId":{"number":"889349"},"name":"Match","rating":{"rate":9.0}}],"performance":{"comment":{}}}&lt;/body&gt;&lt;/html&gt;'
  page = bs4.BeautifulSoup(text, "lxml")
  print type(page)
  </code></pre>
  
  <p>I have tried these but nothing showed up (just blank [])</p>
  
  <pre><code>tmp = page.find_all(text=re.compile("score:(.*)"));
  print(tmp)
  
  tmp = page.findAll("score");
  print(tmp)
  </code></pre>
  
  <p>I found this <a href="https://stackoverflow.com/questions/8678187/how-to-extract-parent-html-tag-in-python-by-matching-the-string">similar question</a> but it gave me error</p>
  
  <pre><code>tmp = page.findAll(text = lambda(x): x.lower.index('score') != -1)
  print(tmp)
  
  AttributeError: 'builtin_function_or_method' object has no attribute 'index'
  </code></pre>
  
  <p>What did I do wrong? Thanks in advance!</p>