1
이 정규식을 사용하면 출력이 각 단일 공백과 일치하는 것으로 보이지만 캡처 그룹은 알파 문자 만 사용됩니다. 나는 뭔가를 놓치고 있어야합니다.Java Regex 그룹이 공백을 찾습니다.
String regexstring = new String("1234567 Mike Peloso ");
Pattern pattern = Pattern.compile("[A-Za-z]*");
Matcher matcher = pattern.matcher(regexstring);
while(matcher.find())
{
System.out.println(Integer.toString(matcher.start()));
String someNumberStr = matcher.group();
System.out.println(someNumberStr);
}
당신이 모든 "단어"를 추출하려고 다음
*
정량은 제로 이상의 시간과creates a disaster of output... 그리고 경기 결과를 인쇄 선행 요소와 일치 문자 시퀀스)? – Bohemian