title: Regex - get everything before first comma - python
body: <p>I have my input data utf8 encoded.  </p>
  
  <p>I'm applying a regular expression on the input to find everything before the comma.<br>
  However my regex returns <code>None</code>, though I can see the comma visually.  </p>
  
  <p>What's wrong with it?<br>
  I tested if <code>','</code> in <code>MyString</code>, which works fine.  </p>
  
  <p>Here is my input data:</p>
  
  <pre><code> ID            MyString
  765427       Units G2 and G3, kings Drive
  207162       Unit 5/165,Elizabeth Palace
  47568        Unit 766 - 767 Gate 7,Jacks Way,
  15498        Unit F, Himalayas Street,
  </code></pre>
  
  <p>As per my regex - <code>re.search(r".*?,", s['MyString'])</code>,<br>
  I expect my output to be: </p>
  
  <pre><code> ID            MyString
  765427       Units G2 and G3,
  207162       Unit 5/165,
  47568        Unit 766 - 767 Gate 7,
  15498        Unit F,
  </code></pre>
  
  <p>But what I am getting is:</p>
  
  <pre><code> ID            MyString
  765427       Units G2 and G3,
  207162       None
  47568        Unit 766 - 767 Gate 7,
  15498        None
  </code></pre>
  
  <p>Please correct if my understanding is right on the regex. Else what's wrong. I can't figure out whats wrong with this.</p>