title: Python regular expression to get filename in a long path
body: <p>I need to analysis some log file and it look like below, I would like to retrieve 3 parts of data, </p>
  
  <ol>
  <li>Time</li>
  <li>part of directory, in this case, it would be ABC and DEF in input file.</li>
  <li>file name in input file, i.e. 2C.013000000B.dat, 20100722B.TXT, 20100722D1-XYZ.TXT and 2C.250B in this case.</li>
  </ol>
  
  <p>I use this regular expression, but it fail to get third part.  </p>
  
  <pre><code>(\d\d:\d\d:\d\d).*(ABC|DEF).*\\(\d\w\.?\w\..*)\soutput.*
  </code></pre>
  
  <p>Any suggestion will be appreciated.</p>
  
  <pre><code>08:38:36   TestModule - [INFO]result success !! ftp_site=ftp.test.com file_dir=CPY input file=\root\level1\level2-ABC\2C.013000000B.dat output file=c:\local\project1\data\2C.013000000B.dat.ext
  06:40:37   TestModule - [INFO]result success !! ftp_site=ftp.test.com file_dir=CPY input file=\root\level1\level2-ABC\20100722B.TXT output file=c:\local\project1\data\20100722B.TXT.ext
  06:40:39   TestModule - [INFO]result success !! ftp_site=ftp.test.com file_dir=CPY input file=\root\level1\level2-DEF\20100722D1-XYZ.TXT output file=c:\local\project1\data\20100722D1-YFP.TXT.ext
  06:40:42   TestModule - [INFO]result success !! ftp_site=ftp.test.com file_dir=CPY input file=\root\level1\level2-DEF\2C.250B output file=c:\local\project1\data\2C.250B.ext
  </code></pre>
  
  <p>BR</p>
  
  <p>Edward</p>