title: Last occurrence of positive lookbehind
body: <p>If I have text in the following format:</p>
  
  <pre><code>string = "B. 1922, Naperville in the Chicago area; white; education: secondary; b/p."
  </code></pre>
  
  <p>I want to capture the "b/p" portion. I thought about using a positive lookbehind:</p>
  
  <pre><code>r"(?&lt;=;)(.*)(?=\.)"
  </code></pre>
  
  <p>But, of course, this looks back to the ";" right after "area." </p>
  
  <p><a href="https://regex101.com/r/B4kt56/1%22Hi%22" rel="nofollow noreferrer">Example</a></p>
  
  <p>How would you all go about capturing everything at the end of the string up to the last occurrence of ";"? The desired output is “b/p”.</p>