import re
# denne matsjer OK
line1='MATERIALSTRENGTH steel 6. 12. 0.5 1.0 670. 800. '
if re.search('MATERIALSTRENGTH[ \t]+[_a-zA-Z]+([0-9.]+|[ \t]+)+$', line1)!=None: print "Matsj"
# men her stopper Python aldri, eneste endring er bokstav i siste "tallet"
line2='MATERIALSTRENGTH steel 6. 12. 0.5 1.0 670. 80b. '
if re.search('MATERIALSTRENGTH[ \t]+[_a-zA-Z]+([0-9.]+|[ \t]+)+$', line2)!=None: print "Matsj"
Registrerte brukere: Google [Bot]