fork(1) download
  1. str="""this is some text
  2.  
  3. Text@7789347: 4444
  4. some text
  5. text @ 7789348 : 666,555
  6. some text
  7. """
  8.  
  9. puts str.scan(/(?mi)^\s*\btext\b.*?@\s*(\d+(?:,\d+)?)\s*:\s*(\d+(?:,\d+)?)$/)
  10.  
  11.  
Success #stdin #stdout 0.02s 7416KB
stdin
Standard input is empty
stdout
7789347
4444
7789348
666,555