1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| package com.ruoyi.common.utils;
|
| public class ChineseUtils {
|
| /**
| * 校验是否是中文
| *
| * @param str
| * @return
| */
| public static boolean isChinese(String str) {
| String regex = "[\\u4e00-\\u9fa5]+";
| return str.matches(regex);
| }
| }
|
|