Regex ABCs for Chinese

An interactive introduction (eleven core lessons plus four extras on real-world pitfalls) to regular expressions for CJK text, with real examples from 《紅樓夢》, the 《明史》 and more. Inspired by RegexOne.

CJK range [\u4e00-\u9fff] Paste it into the regex box. It matches one common Chinese character.

/ /g
Cheat sheet (spoilers!)
[\u4e00-\u9fff]any common CJK character (Unicode range 4E00–9FFF)
[\u3400-\u4dbf]CJK Extension A (rarer characters)
\p{Script=Han}any Han character, all extensions (works because this page uses the u flag)
^ $start / end of the line
\u3000ideographic (full-width) space
[一二三]one character out of a set
[^\u4e00-\u9fff]one character that is not in the range
X+ X* X? X{1,2} X{10,}repeat X: 1 or more / 0 or more / optional / 1 to 2 times / 10 or more times
(林|薛)either 林 or 薛