fork download
  1. import re
  2. L = ['1759@1@83@0#1362@0.2600@25.7400@2.8600#1094@1@129.6@14.4',
  3. '1356@0.4950@26.7300@2.9700',
  4. '1354@1.78@35.244@3.916#1101@2@40@0#1108@2@30@0',
  5. '1430@1@19.35@2.15#1431@3@245.62@60.29#1074@12@385.2@58.8#1109',
  6. '1809@8@75.34@292.66#1816@4@24.56@95.44#1076@47@510.89@1110.61']
  7. pat = r'(?<![^#])\d{4}(?![^@])'
  8. out = [re.findall(pat, x) for x in L]
  9. print (out)
Success #stdin #stdout 0s 23296KB
stdin
Standard input is empty
stdout
[['1759', '1362', '1094'], ['1356'], ['1354', '1101', '1108'], ['1430', '1431', '1074', '1109'], ['1809', '1816', '1076']]