regex
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
regex [2022/06/21 15:01] – created prcurtis | regex [2022/06/21 18:06] (current) – prcurtis | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Regular Expressions (Regex) for Japanese ===== | ===== Regular Expressions (Regex) for Japanese ===== | ||
- | // | + | The regular expressions |
+ | |||
+ | // | ||
<file text jpn_reg.txt> | <file text jpn_reg.txt> | ||
HTML TAGS: < | HTML TAGS: < | ||
Line 18: | Line 20: | ||
METAPHOR (?): .{3}(のように|みたいに).{3} | METAPHOR (?): .{3}(のように|みたいに).{3} | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | <file text jpn_reg_crunchytoast.txt> | ||
+ | Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) | ||
+ | ([一-龯]) | ||
+ | |||
+ | Regex for matching Hirgana or Katakana | ||
+ | ([ぁ-んァ-ン]) | ||
+ | |||
+ | Regex for matching Non-Hirgana or Non-Katakana | ||
+ | ([^ぁ-んァ-ン]) | ||
+ | |||
+ | Regex for matching Hirgana or Katakana or basic punctuation (、。’) | ||
+ | ([ぁ-んァ-ン\w]) | ||
+ | |||
+ | Regex for matching Hirgana or Katakana and random other characters | ||
+ | ([ぁ-んァ-ン!:/]) | ||
+ | |||
+ | Regex for matching Hirgana | ||
+ | ([ぁ-ん]) | ||
+ | |||
+ | Regex for matching full-width Katakana (zenkaku 全角) | ||
+ | ([ァ-ン]) | ||
+ | |||
+ | Regex for matching half-width Katakana (hankaku 半角) | ||
+ | ([ァ-ン゙゚]) | ||
+ | |||
+ | Regex for matching full-width Numbers (zenkaku 全角) | ||
+ | ([0-9]) | ||
+ | |||
+ | Regex for matching full-width Letters (zenkaku 全角) | ||
+ | ([A-z]) | ||
+ | |||
+ | Regex for matching Hiragana codespace characters | ||
+ | (includes non phonetic characters) | ||
+ | ([ぁ-ゞ]) | ||
+ | |||
+ | Regex for matching full-width (zenkaku) Katakana codespace characters | ||
+ | (includes non phonetic characters) | ||
+ | ([ァ-ヶ]) | ||
+ | |||
+ | Regex for matching half-width (hankaku) Katakana codespace characters | ||
+ | (this is an old character set so the order is inconsistent with the hiragana) | ||
+ | ([ヲ-゚]) | ||
+ | |||
+ | Regex for matching Japanese Post Codes | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Regex for matching Japanese mobile phone numbers (keitai bangou) | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Regex for matching Japanese fixed line phone numbers | ||
+ | / | ||
+ | / | ||
+ | |||
+ | Update from 2014 by user cb372 | ||
+ | Hiragana = [ぁ-ゔゞ゛゜ー] | ||
+ | Katakana = [ァ-・ヽヾ゛゜ー] | ||
+ | Hiragana or katakana = [ぁ-ゔゞァ-・ヽヾ゛゜ー] | ||
+ | |||
+ | Update from 2019 by user minhloc2011 | ||
+ | Just updated full-width Katakana from「30A1」~「30FE」 (Unicode:30FB). | ||
+ | Regex for matching full-width Katakana (zenkaku 全角) | ||
+ | ([ァ-ン]) | ||
+ | Replace to: | ||
+ | ([ァ-ヾ]) | ||
</ | </ |
regex.1655823715.txt.gz · Last modified: 2022/06/21 15:01 by prcurtis