fork download
  1. import re, time
  2. text = "c a b d"
  3. pat = re.compile( "^(?!.*__)(?=[A-Za-z])[a-z A-Z0-9_]+(?<![ _])$" )
  4. t1 = time.time()
  5. for i in range( 400000 ):
  6. x = pat.match( text )
  7. t2=time.time()
  8. print( (t2-t1)*1000 )
  9.  
Success #stdin #stdout 0.75s 9120KB
stdin
Standard input is empty
stdout
748.491048813