title: Truncating the end of variables based on pattern
body: <p>I have a list of URLs in formats such as "www.blah.com/en-us" and I need to cut-off anything after the "www.blah.com". I've tried using the following:</p>
  
  <pre><code>import re
  website = www.blah.com/en-us
  cleanURL = re.sub('(.|\n)*?com', "", website)
  </code></pre>
  
  <p>Output: 'en-us'</p>
  
  <p>So I'm getting the opposite of what I want. Sorry if this post isn't correctly formatted, first time asking a question. </p>