[ create a new paste ] login | about

Link: http://codepad.org/X9D3pd7s    [ raw code | output | fork ]

Python, pasted on May 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import re

SourceList = ['08/20/2014',
                 '10:04:27',
                 'pm',
                 'complet',
                 'vendor',
                 'per',
                 'mfg/recommend',
                 '08/20/2014',
                 '10:04:27',
                 'pm', 'complet']

OutputList = filter(
    lambda ThisWord: not re.match('^(?:(?:[0-9]{2}[:\/,]){2}[0-9]{2,4}|am|pm)$', ThisWord),
    SourceList)


for ThisValue in OutputList:
  print ThisValue


Output:
1
2
3
4
5
complet
vendor
per
mfg/recommend
complet


Create a new paste based on this one


Comments: