我有一个 URL 链接
Link=<http://mysample.link.com/first/12/sample?page=1234-asdf>;rel="next"
我想获取 <> 之间的所有内容并得到结果 http://mysample.link.com/first/12/sample?page=1234-asdf
目前我正在使用 String.substring() 像
finalString=sample.subString(sample.indexOf("<"),sample.indexOf(">"));
但我认为这不是最好的方法。有人可以告诉我如何使用正则表达式获取结果字符串。
最佳答案
关于java - java中如何获取<>之间的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21166480/