Searching a webpage for 'href="'

2 ビュー (過去 30 日間)
Janis Uhrig
Janis Uhrig 2016 年 4 月 19 日
編集済み: Jan 2016 年 4 月 21 日
Is there a way to search on a webpage for the string 'href="' like it is done with the string 'http:' in cleve molers surfer.m example?
  2 件のコメント
Guillaume
Guillaume 2016 年 4 月 19 日
Can you provide a link to that example?
Janis Uhrig
Janis Uhrig 2016 年 4 月 21 日
https://www.math.washington.edu/~greenbau/Math_498/surfer.m // Here they are looking for the string 'http:' ,but the website I want to crawl does have the links like this: href="studierende/bachelor-studiengaenge/betriebswirtschaft/aktuelles/terminplaene/terminplan-ss/" class="link">Terminplan</a. So the algorithm can't find the link.

サインインしてコメントする。

回答 (2 件)

Meade
Meade 2016 年 4 月 20 日
Try regexp . For example:
exp = '<href="\w+">'
matches = regexp(youStr,exp,'match')

Jan
Jan 2016 年 4 月 21 日
編集済み: Jan 2016 年 4 月 21 日
index = strfind(Str, 'href=')

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by