12-29-2008, 02:32 PM
How about this one?
I'm not sure how Python does regexps. This should be suitable for Perl-alikes.
s/([KR])[^P]/\1,/
If I got the memory part of the replacement expression wrong, you can do it in two passes with
s/K[^P]/K,/
s/R[^P]/R,/
I'm not sure how Python does regexps. This should be suitable for Perl-alikes.
s/([KR])[^P]/\1,/
If I got the memory part of the replacement expression wrong, you can do it in two passes with
s/K[^P]/K,/
s/R[^P]/R,/