1
0
This repository has been archived on 2025-05-15. You can view files and clone it, but cannot push or open issues or pull requests.
Files
2025-03-09 18:15:46 +01:00

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