title: regex help matching within a single string
body: <p>I have a string like the one below</p>
  
  <pre><code>foobar1.foo-region-1.foo.foodomain.com AZ   foo-region-1c AZ    foo-region-1d ID    i-1b28aeb7 ID   i-ca36b066 hello2.foo-region-1.foo.foodomain.com AZ foo-region-1c AZ    foo-region-1d ID    i-797607d5 ID   i-de95660c helpme3.foo-region-1.foo.foodomain.com AZ    foo-region-1c AZ    foo-region-1d ID    i-3100a4e3 your-welcom4.foo-region-1.foo.foodomain.com AZ   foo-region-1c AZ    foo-region-1d ID    i-51e63fe1 ID   i-c1592476 regex-foobar.foo-region-1.foo.foodomain.com AZ   foo-region-1c AZ    foo-region-1d ID    i-a78a1311 ID   i-5c5150ec cps-web-p-va-001-1455223867.foo-region-1.foo.foodomain.com AZ    foo-region-1b AZ    foo-region-1c AZ    foo-region-1d ID    i-96153212 ID   i-c810aa53 yayme-75-help.foo-region-1.foo.foodomain.com AZ  foo-region-1c AZ    foo-region-1d ID    i-3c96a4b8 ID   i-3d96a4b9 ID   i-3e96a4ba ID   i-548903cf ID   i-558903ce ID   i-568903cd yesno.foo-region-1.foo.foodomain.com AZ  foo-region-1c AZ    foo-region-1d ID    i-6b87f4d8 ID   i-9d57e714 address.foo-region-1.foo.foodomain.com AZ    foo-region-1b ID    i-be4c9322 thanks-you_all.foo-region-1.foo.foodomain.com AZ foo-region-1c AZ    foo-region-1d ID    i-247f9696 ID   i-a20e5427 
  </code></pre>
  
  <p>and i am looking to write a regex line that will match only the items that end with foodomain.com, but encompass the entire strings below</p>
  
  <pre><code>foobar1.foo-region-1.foo.foodomain.com
  helpme3.foo-region-1.foo.foodomain.com
  hello2.foo-region-1.foo.foodomain.com
  your-welcom4.foo-region-1.foo.foodomain.com
  thanks-you_all.foo-region-1.foo.foodomain.com
  yesno.foo-region-1.foo.foodomain.com
  yayme-75-help.foo-region-1.foo.foodomain.com
  </code></pre>
  
  <p>and so on</p>
  
  <p>I've tried differnt things like <code>foo.foodmain.com</code>, but it does not select the entire string.</p>
  
  <p>I've tried <code>\b\.[a-zA-Z]\*\. foo.foodmain.com\ \b</code> and <code>\b \.[a-zA-Z]*\.[a-zA-Z]*\. foo.foodmain.com\ \b</code> and still doesn't work.</p>
  
  <p>I also tried other options, but I cannot seem to get it to select only the string tired together with the <code>.</code> but ending with <code>foodomain.com</code>.</p>
  
  <p>Any help would be appreciated</p>