title: Python using AND with regex
body: <p>So I have looked around the internet for like 20 minutes and I haven't been able to figure it out. Is it possible to use AND in regex, or something similar (I've just started learning about regex)?</p>
  
  <p>For example, I have the string "finksdssfsk32residogs" and I want to get the output: "32 dogs". I've tried using re.search, re.match, and re.findall but I haven't had any luck. I've tried things like:</p>
  
  <pre><code>re.findall(r"(\d{2})(dogs)", str)
  re.search(r"(\d{2})(dogs)", str)
  </code></pre>
  
  <p>And I've tried a few combinations of each. And I know I can do this with multiple lines but the goal is to get "32 dogs" from "finksdssfsk32residogs" with only one line. Any help is appreciated, thanks.</p>