Searching a webpage for 'href="'

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 commentaires

Guillaume
Guillaume le 19 Avr 2016
Can you provide a link to that example?
Janis Uhrig
Janis Uhrig le 21 Avr 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.

Connectez-vous pour commenter.

Réponses (2)

Meade
Meade le 20 Avr 2016

0 votes

Try regexp . For example:
exp = '<href="\w+">'
matches = regexp(youStr,exp,'match')
Jan
Jan le 21 Avr 2016
Modifié(e) : Jan le 21 Avr 2016

0 votes

index = strfind(Str, 'href=')

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Modifié(e) :

Jan
le 21 Avr 2016

Community Treasure Hunt

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

Start Hunting!

Translated by