in reply to remove chars with regex

use strict; use warnings; my $char = "0x388c818ca8b9251b393131c08a736a67ccb19297"; $char =~ s/^([0-9a-fx]{6}).+([0-9a-f]{6})$/$1 \.\.\. $2/; print $char; # 0x388c ... b19297

Replies are listed 'Best First'.
Re^2: remove chars with regex
by frank1 (Monk) on Feb 26, 2025 at 09:36 UTC

    Thanks @Marshall