I am trying to figure out a regular expression which matches any string that doesn\'t start with mpeg. A generalization of this is matching any string which doesn\'t start w
don't lose your mind with regex.
if len(mystring) >=4 and mystring[:4]=="mpeg": print "do something"
or use startswith() with "not" keyword
if len(mystring)>=4 and not mystring.startswith("mpeg")