如何提取:“我/r是/vhi中国人/nr”,“人民/n英雄/n永/ad锤/v不朽/aj”。以上述两个字符串为例,第一个 如何提取 “/nr”之前的汉字,也就是中国人?第二个 如何提取"/aj" 到“/v”之前的汉字,也就是不朽?要求:/nr是代提取目标字符的标识,其他带有/的标注无所谓。多谢!
哎,要是这么简单,就不问百度了,肯定是索引位置不明确的情况,我已经实现了。用lastindexof ()和substring(),向前提取,再去字母不过还是谢谢你的无私帮助