我想在我的文本上找到模式的位置开始和结束。
我使用以下代码:
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());
}
不幸的是,模式没有在我的文本中找到字符串。