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

Is s/^(From:)\s+/$1/; good enough? or maybe s/^([^:]+:)\s+/$1/;?

Update: Added missing ':'

Replies are listed 'Best First'.
Re^2: How can I strip an arbitary number of "inner" spaces from a string?
by Fletch (Bishop) on Sep 17, 2004 at 00:15 UTC

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

      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.