title: How do I remove date formatting substring in python?
body: <p>I'm trying to clean up some data and want to check if there is date formatting in a string.  If there is date formatting, I would like to remove it. </p>
  
  <p>For example, I have inputs like this: 
  "Midnight 10-22-13 HD"</p>
  
  <p>I also, I want to remove HD and check if there is a date at the end and remove it among other parsing like striping characters after a colon. </p>
  
  <pre><code>def func(value):
      str(value)
      if ":" in value:
          return value.split(":", 1)[0]
      if value.endswith('HD'):
          return value[:-3]
      else:
           return value
  </code></pre>
  
  <p>I do not want to assume that the string is last, but rather if it is in the 6 digit - delimenited format and then return the value with out the date.</p>
  
  <p>I'm applying these fucntions to values in a dataframe series </p>
  
  <pre><code> data["LongTitleAdjusted"] = data["Long Title"].apply(func)
  </code></pre>
  
  <p>Here are some examples of inputs: </p>
  
  <pre><code>Stand-Up: "Weird Al" Yankovic   
  Stand-Up: "Weird Al" Yankovic HD    
  Doug Benson 3 HD    
  Midnight 11-14-13   
  Midnight 11-14-13 HD    
  Midnight 01-06-14   
  Midnight 01-06-14 HD    
  Midnight 01-07-14  
  </code></pre>
  
  <p>Desired outputs:</p>
  
  <pre><code>Stand-Up
  Stand-Up
  Doug Benson 3
  Midnight 
  Midnight 
  Midnight 
  Midnight 
  Midnight 
  </code></pre>