Skip to content

Instantly share code, notes, and snippets.

@monokano
Last active April 17, 2024 03:31
Show Gist options
  • Save monokano/3382c91e089eeb9387dc0f2d1ce146cd to your computer and use it in GitHub Desktop.
Save monokano/3382c91e089eeb9387dc0f2d1ce146cd to your computer and use it in GitHub Desktop.
Adobe-Japan1をベースにした全角文字の正規表現
[\x{00A7}-\x{00A8}\x{00B0}-\x{00B1}\x{00B4}\x{00B6}\x{00D7}\x{00F7}\x{0386}\x{0388}-\x{038A}\x{038C}\x{038E}-\x{03A1}\x{03A3}-\x{03CE}\x{03D0}-\x{03D1}\x{03D5}\x{03DB}\x{0401}-\x{040C}\x{040E}-\x{044F}\x{0451}-\x{045C}\x{045E}-\x{045F}\x{2003}\x{2010}\x{2015}-\x{2016}\x{2018}-\x{2019}\x{201C}-\x{201D}\x{2020}-\x{2021}\x{2025}-\x{2026}\x{2030}\x{2032}-\x{2033}\x{203B}-\x{203C}\x{2042}\x{2047}-\x{2049}\x{2051}\x{205A}\x{205D}\x{20DD}-\x{20DE}\x{2100}\x{2103}\x{2105}\x{2109}-\x{210A}\x{210F}\x{2113}\x{2116}\x{2121}\x{212B}\x{2135}\x{213B}\x{2150}-\x{2152}\x{2156}-\x{215A}\x{2160}-\x{216B}\x{2170}-\x{217B}\x{217F}\x{2189}\x{2190}-\x{2194}\x{2196}-\x{2199}\x{21C4}-\x{21C6}\x{21CB}-\x{21CC}\x{21D0}\x{21D2}\x{21D4}\x{21E6}-\x{21E9}\x{21F5}\x{2200}\x{2202}-\x{2203}\x{2205}\x{2207}-\x{2208}\x{220A}-\x{220B}\x{2211}-\x{2213}\x{221A}\x{221D}-\x{2220}\x{2227}-\x{222E}\x{2234}-\x{2235}\x{223D}\x{2243}\x{2252}\x{2260}-\x{2261}\x{2266}-\x{2267}\x{226A}-\x{226B}\x{2272}-\x{2273}\x{2282}-\x{2283}\x{2286}-\x{2287}\x{2295}-\x{2298}\x{22A0}\x{22A5}\x{22BF}\x{2307}\x{2312}\x{2329}-\x{232A}\x{239B}-\x{23AD}\x{23B0}-\x{23B1}\x{23BE}-\x{23CC}\x{23CE}\x{2423}\x{2460}-\x{2492}\x{249C}-\x{254B}\x{2550}\x{255E}\x{2561}\x{256A}\x{256D}-\x{2573}\x{2581}-\x{258F}\x{2594}-\x{2595}\x{25A0}-\x{25A2}\x{25AA}-\x{25AB}\x{25B1}-\x{25B3}\x{25B6}-\x{25B7}\x{25BC}-\x{25BD}\x{25C0}-\x{25C1}\x{25C6}-\x{25C7}\x{25C9}\x{25CB}-\x{25CC}\x{25CE}-\x{25D3}\x{25E2}-\x{25E6}\x{25EF}\x{2600}-\x{2603}\x{2605}-\x{2606}\x{260E}\x{2616}-\x{2617}\x{261C}-\x{261F}\x{2640}\x{2642}\x{2660}-\x{266F}\x{2672}-\x{267D}\x{26A0}\x{26BD}-\x{26BE}\x{2702}\x{2713}\x{271A}\x{273F}-\x{2740}\x{2756}\x{2776}-\x{277F}\x{27A1}\x{2934}-\x{2935}\x{29BF}\x{29FA}-\x{29FB}\x{2B05}-\x{2B07}\x{2B1A}\x{2B95}\x{2E80}-\x{2FDF}\x{3000}-\x{3019}\x{301C}-\x{301D}\x{301F}-\x{3020}\x{3030}\x{3033}-\x{3036}\x{303B}-\x{303D}\x{3041}-\x{3096}\x{3099}-\x{30FF}\x{3190}-\x{319F}\x{31F0}-\x{31FF}\x{3220}-\x{3244}\x{3251}-\x{325F}\x{3280}-\x{32BF}\x{32D0}-\x{32FE}\x{3300}-\x{332B}\x{332D}-\x{3357}\x{3371}\x{337B}-\x{337F}\x{3385}-\x{3389}\x{338D}-\x{3390}\x{3396}-\x{3398}\x{339B}-\x{33A6}\x{33B0}-\x{33B3}\x{33C2}\x{33C4}\x{33C8}\x{33CB}-\x{33CD}\x{33D4}\x{33D7}-\x{33D8}\x{33DA}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F860}-\x{F862}\x{F87A}\x{F87F}\x{F900}-\x{FAFF}\x{FE10}-\x{FE12}\x{FE19}\x{FE30}-\x{FE33}\x{FE35}-\x{FE48}\x{FF01}-\x{FF60}\x{FFE0}-\x{FFE5}\x{1F100}\x{1F110}-\x{1F129}\x{1F130}-\x{1F149}\x{1F150}-\x{1F169}\x{1F170}-\x{1F189}\x{1F202}\x{1F237}\x{20000}-\x{2FFFF}]
@monokano
Copy link
Author

  1. Adobe-Japan1のUniJIS2004でデフォルトグリフが全角グリフのコードポイント
  2. UniJIS2004でデフォルトグリフがプロポーショナルの4つの引用符「‘ ’ “ ”」を追加
  3. Unicodeのすべての漢字のコードポイントを追加

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment