Skip to content

Instantly share code, notes, and snippets.

@softmoth
Created December 30, 2011 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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