2010-05-20 174 views

回答

3

嘗試從功能urlreadweb開始。

1

urlread將向任何URL發出HTTP請求並將結果作爲字符數組返回。

例如:

>> s = urlread('http://www.mathworks.com'); 
>> whos s 
    Name  Size    Bytes Class Attributes 

    s   1x23346   46692 char    

取決於你正在尋找提取物作爲一個變量到底是什麼,你可能不得不進一步處理後的使用功能,如regexpstr2double結果。

+1

用正則表達式解析HTML ?!哦,親愛的神NOOOOOO! (http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454)......雖然嚴重,但這不是一個可怕的選擇簡單的解析條件。 ;) – gnovice 2010-05-20 18:29:10

相關問題