title: Python regular expression substitute whitespace for hyphen
body: <p>I get a lob object that may have one or many dates.  thinking of the dates as a table if the first date is empty I get a chr(20).  ex 3rd element of array has a date the first two empty would look similar to " "," ","01/01/01 01:01:01".  I would like to change the " " in the date time string to something different ("-") so I can easily differentiate between just an empty element and an actual date time value with a space in the middle.  Brand new to python and regular expressions would not be considered my strong suit.</p>
  
  <pre><code>&gt;&gt;&gt; x = '01/01/12 17:11:11'
  &gt;&gt;&gt; y = re.sub( r"\d{2} \d{2}", r"\d{2}-\d{2}",x)
  &gt;&gt;&gt; print (x,y)
  01/01/12 17:11:11 01/01/\d{2}-\d{2}:11:11
  </code></pre>