나는 밖으로 "274.20p"을 얻을 필요가 :Ruby 정규식 - 행의 중간과 끝을 확인 하시겠습니까?
<td class="dataRegularUlOn" >
그래서 뭔가 같은 :
/<td(.*?)class="dataRegularUlOn"(.*?)>/
나 '
이<td nowrap="nowrap" class="dataRegularUlOn" style="text-align: right;">274.20p</td>
나는에 정규 표현식을하고 싶습니다 리눅스에서 루비를 사용하고 있습니다. 대신 http://github.com/whymirror/hpricot 같은 것을 사용하고 그냥 값을 검색 할 요소에 XPath를 사용할 수없는 이유는
thks
A "루비 HTML 파서"더이 작업에 적용 할 수 있습니다 http://ruby-toolbox.com/categories/html_parsing.html – VonC
필수 크 툴후를 링크 : http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags –