fork download
  1. import re
  2. p = re.compile('^TestVar\s+(\d{8})\s+(\S+)')
  3. m = p.match('TestVar 00000000 WWWWWW 222.222 222.222 222.222')
  4. if m:
  5. print 'Match found: ', m.group(2) + '_' + m.group(1)
  6. else:
  7. print 'No match'
Success #stdin #stdout 0.08s 10864KB
stdin
Standard input is empty
stdout
Match found:  WWWWWW_00000000