perl -e '$shoo=q!my name is prince!; while($shoo=~m/i/g){$rx = $+[0] unless $rx } print $rx;