title: Regular Expression to for Python nltk to split a Java application log into sentences
body: <p>I am trying to write a regular expression to split a java application log into sentences using the Python nltk toolkit.</p>
  
  <p>I've read the log file into a variable via log_file_1_raw = log_file_1.read()</p>
  
  <p>I then tried using the following to split the text into sentences:</p>
  
  <pre><code>log_file_1_sent = re.split('^[2][0][1][6]-[0-1][0-9]-[0-3][0-9][a-zA-Z0-9 : , ! \. \-]+([\\][n])$', log_file_1_raw).
  </code></pre>
  
  <p>Because the log_file_1_raw variable converts new line into \n this marks the end of a log entry and each log entry starts with an American style date.</p>
  
  <p>When I run the above code I end up with the whole log as a single sentence instead of multiple sentences.</p>
  
  <p>So I would appreciate it if someone could show me where I am going wrong with the regular expression as I have been stuck on this for several hours now.</p>
  
  <p>Here is an excerpt of the <code>log_file_1_raw</code>, which when parsed by <code>re.split</code> is returned as a single sentence.</p>
  
  <pre><code>2016-11-11 08:56:12,801 INFO  mysite.co.uk.app.web.ips.controller.variables.Validator iatSYWX3SYnLrlEx0OtXPJJNun7iYe73gRtGa5G1YyIL89wmnJbg!49205849!1478850864631 - checking for each variable on page....\n
  2016-11-11 08:56:12,801 INFO  mysite.co.uk.app.web.ips.controller.variables.Validator iatSYWX3SYnLrlEx0OtXPJJNun7iYe73gRtGa5G1YyIL89wmnJbg!49205849!1478850864631 - variable Name: 16691310467\n
  2016-11-11 08:56:12,801 INFO  mysite.co.uk.app.web.ips.controller.variables.Validator iatSYWX3SYnLrlEx0OtXPJJNun7iYe73gRtGa5G1YyIL89wmnJbg!49205849!1478850864631 - variablesForm.getFileName: null\
  </code></pre>