fork(1) download
  1. #!/bin/bash
  2. s='FROM some_registry as registry1
  3. From another_registry'
  4. grep -oP '(?i)\bFROM\s+\K.*?(?=\s+as\b|$)' <<< "$s"
  5.  
Success #stdin #stdout 0.01s 5444KB
stdin
Standard input is empty
stdout
some_registry
another_registry