title: Python - Locating the position of a regex match in a string?
body: <p>I'm currently using regular expressions to search through RSS feeds to find if certain words and phrases are mentioned, and would then like to extract the text on either side of the match as well. For example:</p>
  
  <pre><code>String = "This is an example sentence, it is for demonstration only"
  re.search("is", String)
  </code></pre>
  
  <p>I'd like to know the position(s) of where the 'is' matches are found so that I can extract and output something like this:  </p>
  
  <pre><code>1 match found: "This is an example sentence"
  </code></pre>
  
  <p>I know that it would be easy to do with splits, but I'd need to know what the index of first character of the match was in the string, which I don't know how to find</p>