Шаблон в regex javaJAVA

Программисты JAVA общаются здесь
Anonymous
Шаблон в regex java

Сообщение Anonymous »

Я хочу найти начало позиции и окончание шаблона в моем тексте. < /p>

Я использую следующий код: < /p>

Pattern _pat=Pattern.compile("20. Eslaminejad MB, Nikmahzar A, Piriea A. The structure of "
+"Human Mesenchymal Stem Cells differentiated into cartilage in micro mass culture system. Yakhteh 2006, 8(3): "
+"162-171.");

Matcher _match=_pat.matcher("19. Eslaminejad MB, Eftekhari-Yazdi P. Mesenchymal stem "
+"cells: In vitro differentiation among bone and cartilage cell "
+"lineages. Yakhteh. 2007; 9(3): 158-169."
+"20. Eslaminejad MB, Nikmahzar A, Piriea A. The structure of "
+"Human Mesenchymal Stem Cells differentiated into cartilage in micro mass culture system. Yakhteh 2006, 8(3): "
+"162-171."
+"21. Pioletti DP, Montjovent MO, Zambelli PY, Applegate L. "
+"Bone tissue engineering using foetal cell therapy. Swiss "
+"Med Wkly. 2006 ; 136(35-36): 557-560.");

while(_match.find()){
System.out.println(_match.start());
System.out.println(_match.end());
}
< /code>

К сожалению, шаблон не находит строку в моем тексте. < /p>

Подробнее здесь: https://stackoverflow.com/questions/175 ... regex-java

Вернуться в «JAVA»