I have a bunch of strings but I only want to keep the ones with this format:
x/x/xxxx xx:xx
What is the easiest way to check if a string meets this format? (Assuming I want to check by if it has 2 /'s and a ':' )
try with regular expresion:
import re
r = re.compile('.*/.*/.*:.*')
if r.match('x/x/xxxx xx:xx') is not None:
print 'matches'
you can tweak the expression to match your needs