45 lines
1.1 KiB
Dart
Executable File
45 lines
1.1 KiB
Dart
Executable File
|
|
/// The string version of a regex that will match any Unified CJK Character.
|
|
/// This includes the ranges (), ()
|
|
///
|
|
/// See https://www.regular-expressions.info/unicode.html
|
|
///
|
|
/// Remember to turn on the unicode flag when making a new RegExp.
|
|
const String rawKanjiRegex = r'\p{Script=Hani}';
|
|
|
|
/// The string version of a regex that will match any katakana.
|
|
/// This includes the ranges (), ()
|
|
///
|
|
/// See https://www.regular-expressions.info/unicode.html
|
|
///
|
|
/// Remember to turn on the unicode flag when making a new RegExp.
|
|
const String rawKatakanaRegex = r'\p{Script=Katakana}';
|
|
|
|
/// The string version of a regex that will match any hiragana.
|
|
/// This includes the ranges (), ()
|
|
///
|
|
/// See https://www.regular-expressions.info/unicode.html
|
|
///
|
|
/// Remember to turn on the unicode flag when making a new RegExp.
|
|
const String rawHiraganaRegex = r'\p{Script=Hiragana}';
|
|
|
|
|
|
final RegExp kanjiRegex = RegExp(rawKanjiRegex, unicode: true);
|
|
final RegExp katakanaRegex = RegExp(rawKatakanaRegex, unicode: true);
|
|
final RegExp hiraganaRegex = RegExp(rawHiraganaRegex, unicode: true);
|
|
|
|
// symbols
|
|
|
|
|
|
|
|
|
|
//is
|
|
//has
|
|
|
|
// X
|
|
|
|
// kana
|
|
// katakana
|
|
// hiragana
|
|
// japanese
|
|
// kanji |