On Oct 25, Woz said:

>turn the following string
> 
>insert_job: DUKS_rtcf_daily_log_purge job_type: c
> 
>into
> 
>DUKS_rtcf_daily_log_purge job_type: c
> 
>i.e. remove from the beginning of the line up the space following the
>first :

You're probably trying

  s/.*: //;

which is matching greedily all the way to the last : it finds.  There are
two approaches you can take to fix this:

  s/.*?: //;    # non-greedy matching stops as soon as possible
  s/[^:]*: //;  # match zero or more non-colons

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to