RegexConstants.java 535 B

12345678910111213141516171819
  1. package com.persagy.fm.common.constant;
  2. /**
  3. * 正则表达式常量
  4. *
  5. * @author lixing
  6. * @version V1.0 2021/3/19 3:40 下午
  7. **/
  8. public class RegexConstants {
  9. /**
  10. * 名称正则表达式
  11. * 支持中英文字符,数字,"._#~"
  12. */
  13. public static final String NAME_REGEX = "([\u4e00-\u9fa5]|[a-z]|[A-Z]|[0-9]|['._#~])+";
  14. /**
  15. * 名称不符合正则表达式时的报警信息
  16. */
  17. public static final String NAME_REGEX_WARNING = "仅可输入中文,字母,数字以及 ' . - _ # ~";
  18. }