cut but include delimiter at end

Can someone please tell me how to do this...

input file - /etc/group:

wheel:*:0:root,timber
daemon:*:1:
mysql:*:88:
...etc...
giants:*:1001:dalton,bandit
dalton:*:1002:
bandit:*:1003:

output file (my goal):

giants:*:1001:
dalton:*:1002:
bandit:*:1003:

I've come up with this:

which works fine, except the trailing colon is missing:

output file (missing trailing colon)

giants:*:1001
dalton:*:1002
bandit:*:1003

Is there a simple way to get the trailing colon appended, without invoking yet another script to do so?

Thank you in advance!

With awk:

awk 'BEGIN{FS=OFS=":"}/dalton/||/bandit/{print $1,$2,$3 OFS}' /etc/group

Regards

egrep 'dalton|bandit' /etc/group | cut -sd':' -f1-3 | sed 's/$/:/'

Good old sed:

sed -n '/dalton\|bandit/{s/\(:[0-9]\{4\}:\).*$/\1/p}' /etc/group

HTH Chris