title: Regex to extract Organization names in python
body: <p><strong>SAMPLE PROGRAM</strong></p>
  
  <pre><code>import re
  
  demostr = "Department of Microbiology and Immunology. Faculty of Tropical Medicine, Mahidol University, Electronic address: pornsawan.lea@mahidol.ac.th."
  org = re.search(r"([A-Z][^\s,.]+[.]?\s[(]?)*(Dept|Association|Office|University|Department)[^,\d]*(?=,|\d)", demostr).group()
  print(org)   
  </code></pre>
  
  <p><strong>OUTPUT</strong></p>
  
  <pre><code>Department of Microbiology and Immunology. Faculty of Tropical Medicine
  </code></pre>
  
  <p>The program extracts Organization, Department from the given string. It works fine if there is <code>,</code> after <code>Immunology</code>. but when in cases there is a dot <code>.</code> after Organization it extracts wrong output. 
  The required output is shown below-</p>
  
  <p><strong>EXPECTED OUTPUT</strong></p>
  
  <pre><code>Department of Microbiology and Immunology
  </code></pre>