如何在java中读取字符串部分

Gan*_*row 5 java regex

我有这个字符串:

<meis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" uri="localhost/naro-nei" onded="flpSW531213" identi="lemenia" id="75" lastStop="bendi" xsi:noNamespaceSchemaLocation="http://localhost/xsd/postat.xsd xsd/postat.xsd">
Run Code Online (Sandbox Code Playgroud)

我怎样才能获得lastStopJAVA的房产价值?

这个正则表达式在http://www.myregexp.com/上测试时有效

但是当我在java中尝试它时,我没有看到匹配的文本,这是我尝试的方式:

import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class SimpleRegexTest {
    public static void main(String[] args) {
        String sampleText = "<meis xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" uri=\"localhost/naro-nei\" onded=\"flpSW531213\" identi=\"lemenia\" id=\"75\" lastStop=\"bendi\" xsi:noNamespaceSchemaLocation=\"http://localhost/xsd/postat.xsd xsd/postat.xsd\">";
        String sampleRegex = "(?<=lastStop=[\"']?)[^\"']*";
        Pattern p = Pattern.compile(sampleRegex);
        Matcher m = p.matcher(sampleText);
        if (m.find()) {
            String matchedText = m.group();
            System.out.println("matched [" + matchedText + "]");
        } else {
            System.out.println("didn’t match");
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

也许问题是我在测试中使用了escape char,但是真正的字符串里面没有转义.?

UPDATE

有谁知道为什么这在java中使用时不起作用?或者如何使它工作?