title: Beautiful Soup Find Tags based on partial attribute value
body: <p>I am trying to identify tags in an html document based on part of the attribute value.</p>
  
  <p>For example, if I have a Beautifulsoup object:</p>
  
  <pre><code>import bs4 as BeautifulSoup
  
  r = requests.get("http:/My_Page")
  
  soup = BeautifulSoup(r.text, "html.parser")
  </code></pre>
  
  <p>I want <code>tr</code> tags with <code>id</code> attribute whose values are formatted like this: "news_4343_23255_xxx".  I'm interested in any <code>tr</code> tag as long as it has "news" as the first 4 characters of the <code>id</code> attribute value.</p>
  
  <p>I know I can search as follows:</p>
  
  <pre><code>trs = soup.find_all("tr",attrs={"id":True})
  </code></pre>
  
  <p>which gives me all <code>tr</code> tages with an <code>id</code> attribute.</p>
  
  <p>How do I seach based on a substring?</p>