package org.jimmy.autotranslate20181022.test; import java.util.regex.Pattern; public class Regular20181106 { public static void main(String[] args) { String reg = "[\u30a0-\u30ff\u3040-\u309f\u30fc-\u30ff\u4e00-\u9faf\u3400-\u4dbf]+"; Pattern pattern = Pattern.compile(reg); System.out.println(pattern.matcher("疾风かぜを駆かけ抜ぬけて").matches()); } }
utf-8编码范围转自ta的博客,详情请看ta这篇,谢谢:
http://xuehaipeng.iteye.com/blog/613825
运行结果: