title: return two values regex python
body: <p>I have a data frame where the values I want are in the same cell like this - words and all:</p>
  <p>depth: 3230 m - 3750 m</p>
  <p>I'm trying to write a regex to return the first number and then the second into a new data frame.
  so far, I can get the values with this:</p>
  <pre><code> top_depthdf=df[0].str.extract(r'depth:\s(\d+(?:\.\d+)?)', flags=re.I).astype(float)
   base_depthdf=df[0].str.extract(r'-\s(\d+(?:\.\d+)?)', flags=re.I).astype(float)
  </code></pre>
  <p>where I am having an issue is that these patterns are not unique in this data, especially the base depth one. Other numbers have a similar pattern and my script is returning them instead of the base depth if they occur before the depth row. I was wondering if there is a way to write the base_depthdf in such a way that it looks for the 'depth:' part first and then looks for that pattern?</p>