$ echo '| foo:bar ' | perl -nle'print for /\|\s+([\w.:]+)\s+/;' foo:bar