my $string = "RYOURPOSTBROKEN"; print("input: $string\n"); print("expecting: R YOURPOSTBR OK EN\n"); print("\n"); { # mwah (split) my $re = qr/(?<=[KR])(?!P)/; my @arr = split $re, $string; print("split $re: @arr\n"); } { # tachyon-II (re) my $re = qr/(.*?[KR])(?!P)/s; my @arr = $string =~ /$re/g; print("$re: @arr\n"); } { # mwah (re) my $re = qr/[^KR]+.(?!P)/s; my @arr = $string =~ /$re/g; print("$re: @arr\n"); } #### input: RYOURPOSTBROKEN expecting: R YOURPOSTBR OK EN split (?-xism:(?<=[KR])(?!P)): R YOURPOSTBR OK EN (?s-xim:(.*?[KR])(?!P)): R YOURPOSTBR OK (?s-xim:[^KR]+.(?!P)): YOU POSTBR OK EN (?s-xim:[^KR]*.(?!P)): R YOU POSTBR OK EN