>>>>> "GL" == Greg London <[EMAIL PROTECTED]> writes:

  GL> $string =~ s{:}{\\:}g;

that converts the first : as well as the rest. he wants all but the
first escaped.

  >> OH: If I was an Osc:ar Mayer Wiener, tha:t is what I:d Truly like to b:e
  >> OH: If I was an Osc\:ar Mayer Wiener, tha\:t is what I\:d Truly like to b\:e

well i don't see any reason it can't be a one liner but not a single
regex: (tested)

        perl -pe 'substr( $_, index( $_, ":") + 1 ) =~ s{:}{\\:}g'

modify to suit.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to