Artificial intelligent assistant

How to use sed to obfuscate an IPv6 address I have the following sed command sed -i 'test.log' -e 's/\([0-9a-fA-F]\{1,4\}\:\)\{7,7\}[0-9a-fA-F]\{1,6\}/\1\w/g' The goal is to erase the last two blocks of the IPv6 address. However, this sed command doesn't work. Is there something wrong with the syntax?

how far would


sed -r 's/(([[:xdigit:]]{,4}:)*)[[:xdigit:]]{,4}:[[:xdigit:]]{,4}$/\1:/' file


get you?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cf75e7875244aa7d8d83ea103dc568d9