fork(19) download
  1. #!/bin/bash
  2. s="Text
  3. Version : 3.4.0.0 xxx xxx xxx
  4. More text
  5. Version : 5.6.0.0 xxx xxx xxx"
  6. grep -oPm 1 'Version\s*:\s*\K\d+(?:\.\d+)+' <<< "$s"
Success #stdin #stdout 0s 19632KB
stdin
Standard input is empty
stdout
3.4.0.0