12-29-2008, 04:32 PM
TheCaber wrote:
[quote=TheTominator]
How about this one?
I'm not sure how Python does regexps. This should be suitable for Perl-alikes.
s/([KR])[^P]/\1,/
...
s/([KR])([^P])/\1,\2/
will not strip off the non-P following a K-or-R match
Oh yeah. Good catch.
I always do programming in two stages.
Stage 1: Bugging
Stage 2: Debugging