Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any regular expressions gurus here?
#3
TheTominator wrote:
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
Reply


Messages In This Thread
Any regular expressions gurus here? - by volcs0 - 12-29-2008, 08:24 AM
Re: Any regular expressions gurus here? - by TheCaber - 12-29-2008, 03:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)