The : is done like your \ but just replace it with nothing.
the _20xx_ problem is: $stamp =~ /_\d{4}_//;
You can handle the \ space and colon with a single command: tr/\/ :/_/d
T
I
M
T
O
W
T
D
I
Comment on Re: How do I use regex to strip out specific characters in a string?