Searching a webpage for 'href="'

1 visualizzazione (ultimi 30 giorni)
Janis Uhrig
Janis Uhrig il 19 Apr 2016
Modificato: Jan il 21 Apr 2016
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 Commenti
Guillaume
Guillaume il 19 Apr 2016
Can you provide a link to that example?
Janis Uhrig
Janis Uhrig il 21 Apr 2016
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.

Accedi per commentare.

Risposte (2)

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

Jan
Jan il 21 Apr 2016
Modificato: Jan il 21 Apr 2016
index = strfind(Str, 'href=')

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by