Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Created September 20, 2016 15:27
Show Gist options
  • Save hokaccha/bb1a10c55d47e15305721fee6ed020e1 to your computer and use it in GitHub Desktop.
Save hokaccha/bb1a10c55d47e15305721fee6ed020e1 to your computer and use it in GitHub Desktop.
p AhoCorasick.new(["8年", "18年"]).match('平成18年') #=> ["18年"]
p AhoCorasick.new(["8年", "18年", "平成17年台風第11号"]).match('平成18年') #=> ["8年"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment