Skip to content

Instantly share code, notes, and snippets.

@EvanBurchard
Created March 31, 2009 05:17
Show Gist options
  • Save EvanBurchard/88066 to your computer and use it in GitHub Desktop.
Save EvanBurchard/88066 to your computer and use it in GitHub Desktop.
Potentially a bit buggy. I think the Kanji actually includes some Korean, but it's worked most of the time.
KANJI= Regexp.new('[一-]')
HIRAGANA= Regexp.new('[ぁ-ゞ]+')
KATAKANA= Regexp.new('[゠-ヾ]+')
MULTI_KANJI= Regexp.new('[一-]+')
KANJI_AND_HIRAGANA= Regexp.new('[一-]+[ぁ-ゞ]*')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment