Last active
May 4, 2022 10:13
-
-
Save githubhy/179559994119a43d2b17129c3817153e to your computer and use it in GitHub Desktop.
Regular expression for Chinese characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl: /[^u4E00-u9FA5]/ | |
js: match(/[\u4E00-\u9FA5]/) | |
Example: | |
use `<([^u4E00-u9FA5]*<[^u4E00-u9FA5]+>[^u4E00-u9FA5]*)*>` to match `<封爵 河津亭侯→安國鄉侯→向鄉侯→舞陽侯→晉王<追尊>→晉帝<追尊>>` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment