“Unmappable character for encoding UTF-8” error

后端 未结 10 833
失恋的感觉
失恋的感觉 2020-11-27 03:21

I\'m getting a compile error at the following method.

public static boolean isValidPasswd(String passwd) {
    String reg = \"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-         


        
10条回答
  •  醉酒成梦
    2020-11-27 03:39

    The following compiles for me:

    class E{
       String s = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~#;:?/@&!\"'%*=¼.,-])(?=[^\\s]+$).{8,24}$";
    }
    

    See:

    enter image description here

提交回复
热议问题