regular expression 사용 예제

오랫만에 패턴 매칭해서 결과값 구하는것 찾음.
regular expression은 내가 짠거는 쉬운데 남이 짠거는 잘 안읽힘. ㅠ


Pattern p = Pattern.compile("(([a-zA-Z][0-9][0-9]?)\\s*[\\/]\\s*.{3}\\s*[\\/]\\s*)");Matcher m = p.matcher(line); while(m.find())

T10 / name / AB12345

Comments

Popular posts from this blog

codefights smooth sailing ( CommonCharacterCount)

How to remove 8443 port in URL in tomcat