正則匹配所有的a標簽
<a\b[^>]+\bhref="([^"]*)"[^>]*>([\s\S]*?)</a>分組1和分組2即為href和value解釋:<a\b #匹配a標簽的開始[^> ...
<a\b[^>]+\bhref="([^"]*)"[^>]*>([\s\S]*?)</a>分組1和分組2即為href和value解釋:<a\b #匹配a標簽的開始[^> ...
這里以a標簽為例 a標簽的href a標簽的內容沒有屬性centent a標簽帶屬性的匹配內容 參考 Regex select all text between tags 9 Regular Expressions to strip HTML tags ...