嗨,大家好我試圖找回這兩條標如文本之間的聯繫,在這裏它將然後將其存儲在一個列表中,如何檢索與該模式的文字和匹配器兩個標記之間檢索代碼
public void getlinks() {
Pattern Start = Pattern.compile(this.PatternStart); //<Link>
Pattern End = Pattern.compile(this.PatternEnd); //</Link>
Matcher mStart = Start.matcher(this.Source); // matches Start
Matcher mEnd = End.matcher(this.Source); // matches end
????????????
}
試圖找到之間和html源代碼裏面的鏈接,只需使用你做一個這樣的例子
向我們展示了什麼文字看起來像,說你要匹配什麼。 – Keppil 2012-07-07 15:48:19