#!/bin/bashLIST="foo:1.0.0foo-bar:1.0.1" VERSION=$(echo "${LIST}" | grep -P "\bfoo\b(?!-)" | cut -s -d':' -f2) echo -e "VERSION: ${VERSION}"
Standard input is empty
VERSION: 1.0.0
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!