in reply to Re: How can I strip an arbitary number of "inner" spaces from a string?
in thread How can I strip an arbitary number of "inner" spaces from a string?

ITYM s/^([^:]+:)\s+/$1/;

  • Comment on Re^2: How can I strip an arbitary number of "inner" spaces from a string?
  • Download Code

Replies are listed 'Best First'.
Re^3: How can I strip an arbitary number of "inner" spaces from a string?
by gothic_mallard (Pilgrim) on Sep 17, 2004 at 08:19 UTC
    A bit shorter but should still work okay:
    s/(\:)\s+/$1/
    or just for fun:
    s/(:) +/$1/
    Second probably has loads of reasons why it'll fall over in other cases but seems to work fine here.