Captured group
- Input
- Padrão (ID)-(\d+) trocado por ticket-$2 ID-1001 ID-1002 ID-1003
- Expected output
- ticket-1001 ticket-1002 ticket-1003
The second capture group, (\d+), holds only the digits; $2 in the replacement returns that piece, discarding the "ID" prefix the first group captured.