之間取<>字符串我有一個URL鏈接如何用Java
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(">"));
但我不認爲這是最好的辦法。有人可以告訴我如何使用正則表達式獲取結果字符串。
您必須獲取結果匹配的組(1)。 – ehudt
非常感謝。也感謝您的網站鏈接 – Ashish
組(1)或組(0) – Ashish