title: Python - Regex - from Xpath - TypeError: '_sre.SRE_Match' object is not subscriptable
body: <p>The following code downloads a webpage, finds and element then runs a regular expression to parse a number out of the string.  It seems to work on my python 3.7 test system but not my python 3.5.  I am downloading a webpage, finding a text block using Xpath.  The xpath returns something like 'International (21)' or 'Books (99)'    I want to extract out the number, the 21 or 99.</p>
  
  <p>In python 3.5 I get back  '<strong><em>TypeError: '_sre.SRE_Match' object is not subscriptable.'</em></strong> </p>
  
  <p>I am not convinced the error is the differences in versions but that that is the only known diff.   The xpath seems to be working as it returns '<strong>&lt;_sre.SRE_Match object; span=(14, 18), match='(21)'>'</strong> when I print CountObj.  </p>
  
  <p>Is there a tweak I should make for python 3.5, is there a better way to code this?</p>
  
  <pre><code>driver = webdriver.Chrome()
  driver.get(url); #Download the URL passed from mysql
  
  CatAndCount =  driver.find_element_by_xpath('//h2 [@class="searchResultsTitle"]').text 
   # the above line returns with a name and value like 'International (21)'
  
  CountObj = re.search("\((.*?)\)",CatAndCount)  # look for the number, 21 in example
  print (CountObj) # for testing
  CountVal=CountObj[1]
  </code></pre>