title: matching string with similar ending text
body: <p>I have some strings like:</p>
  
  <pre><code>a-bob-01.fred.blogs.com
  b-bob-02.blogs.com
  c-bob-03.fred.blogs.com
  d-bob-04.bob.fred.blogs.com
  </code></pre>
  
  <p>i want to capture the first name, so i try:</p>
  
  <pre><code>(?&lt;name&gt;.*).fred.blogs.com|.blogs.com|.bob.fred.blogs.com
  </code></pre>
  
  <p>but only captures:</p>
  
  <pre><code>a-bob-01
  
  c-bob-03
  d-bob-04.bob
  </code></pre>
  
  <p>is there a way to use the OR with regex to filter all alternatives?</p>
  
  <p>Thanks</p>