在我尝试mytext.include?(">Model number<")
返回的红宝石中false
。但是mytext.include?("Model number")
返回true
第一个条件有什么问题?
mytext
"Model number"
包含里面的字符串">"
和"<"
这是相关的 HTML:
<div class="bucket"> <div class="h1"><strong>Product Specifications</strong></div> <div class="content"> <div class="tsSectionHeader">Product Information</div> <div class="tsTable"> <div class="tsRow"><span class="tsLabel">Model number</span><span>516C</span></div> <div class="tsRow"><span class="tsLabel">Maximum weight recommendation</span><span>35 Pounds</span></div> <div class="tsRow"><span class="tsLabel">Material Type</span><span>Wood</span></div> </div> </div> </div>