0
是否有可能grep
某種程度上來自文件的所有價格並列出輸出?價格以「$」開頭,可能包含數字,「,」和「。」。grep從文件的所有價格
我試過最好的解決方案,從this question,但他們輸出包含價格的所有文件或整個字符串。
我使用的圖案是簡單的:\$
在網絡上的頁面欲到grep:網頁源代碼的http://www.ned.org/
實施例:
<p><strong>Better Understanding Public Attitudes and Opinions</strong>
</p>
<p>Democratic Ideas and Values</p>
<p>$43,270</p>
<p>To monitor and better understand public views on key social, political, and economic developments. Citizens’ opinions will be tracked, documented, and studied ahead of and after the country’s September 2016 parliamentary elections. The results and accompanying analysis will be disseminated through print and electronic publications, a website, and independent media.</p>
<p><strong> </strong></p>
我想從該輸出一片html的東西像是4470或可能是43270.只是爲了懶寫一個解析器:)
至少你可能會表現出一定的輸入例如 – RomanPerekhrest
@RomanPerekhrest,確保萬無一失。對不起,以前沒有這樣做。 – kelin