Java&JSP
[JAVA] matches 함수를 이용해 특수문자 체크
LuckyRoux
2020. 2. 5. 23:08
자바에서 특수문자를 확인하고 싶을때 matches 함수를 이용하여 확인해보자.
String str = "가나다라!!";
boolean result = str.matches ("[0-9|a-z|A-Z|ㄱ-ㅎ|ㅏ-ㅣ|가-힝]*");
result 값 확인 true , false