in reply to how to deal with newline
perl -ne 'print "$1\n" if /[name|id]="(\w+)/' myfile.txt [download]