Bash find & replace using regex pipe

Reply to comment

For group replacements, use $1, $2, etc.

perl -pe 's/(\d+).*/\1/g'