in reply to How do I use regex to strip out specific characters in a string?

array slicing !
while (<DATA>){print join "_",(split/[ \/]/,$_)[1,2,4]} __DATA__ Wed 08/22/2001 2:38p
update Golf! Golf!
the above is 40, inside brackets, with print

update 22 : s/.{3,4} //g&&y|/|_|;
update I wasn't removing the colon :( so, at 23 s/.{3,4} //g&&y|/:|_|d
update as dutifully noted below, by danboo.

Replies are listed 'Best First'.
Re: Re: How do I use regex to strip out specific characters in a string? (boo)
by Sifmole (Chaplain) on Aug 23, 2001 at 01:00 UTC
    Removed one.... s/....? //g&&tr|/:|_|d; Update
    And one more, s/....? //g&&tr|/:|_|d;
      20: s/\w+ //g&&y|/:|_|d;
        You can easily get rid of one more:
        19: s/\w+ //g&y|/:|_|d;
Re: Re: How do I use regex to strip out specific characters in a string? (boo)
by danboo (Beadle) on Aug 23, 2001 at 00:56 UTC
    your code gets shorter, but it's not getting any closer to solving the problem. the ':' remains.