Skip to content

Instantly share code, notes, and snippets.

@pocke
Created February 26, 2019 06:26
Show Gist options
  • Save pocke/858909c0f4dc812fbebf04b7cfa1e96c to your computer and use it in GitHub Desktop.
Save pocke/858909c0f4dc812fbebf04b7cfa1e96c to your computer and use it in GitHub Desktop.
# ref: https://tama-san.com/kanji-regex/
kanji = [
*("\u{2E80}".."\u{2FDF}").to_a,
"\u{3005}",
"\u{3007}",
"\u{303B}",
*("\u{3400}".."\u{4DBF}").to_a,
*("\u{4E00}".."\u{9FFF}").to_a,
*("\u{F900}".."\u{FAFF}").to_a,
*("\u{20000}".."\u{2FFFF}").to_a,
]
kanji.repeated_permutation(2) do |a, b|
puts "#{a}#{b}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment