perl -nle 'while(m/constant=(.*)\s/g){print "$1"}' /home/jamie/example.txt