grep

1
cat xxx.txt | grep -Eo "hello-*\.txt"

sed

1
cat xxx.txt | sed -r "s/.*(hello-*\.txt)\.rar/\1/g"