Skip to content

Instantly share code, notes, and snippets.

@softmoth
Created December 30, 2011 01:50
Show Gist options
  • Save softmoth/1537223 to your computer and use it in GitHub Desktop.
Save softmoth/1537223 to your computer and use it in GitHub Desktop.
LTM bug with <{ join '|', @array }> regex
my @words = <north northeast>;
print "unsorted: ";
say 'northeast' ~~ / ^ <{join '|', @words }> $ / ?? "parsed $/" !! 'no parse';
print "sorted: ";
say 'northeast' ~~ / ^ <{join '|', @words.sort({ $^b.chars cmp $^a.chars }) }> $ / ?? "parsed $/" !! 'no parse';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment