Note that there are some explanatory texts on larger screens.

plurals
  1. POExtracting between <br> tags with Nokogiri?
    primarykey
    data
    text
    <p>I am trying to extract the phone number and the address from this <a href="http://map.burlingamedowntown.org/textdir.cfm?p=1213" rel="nofollow">site</a> using Nokogiri. Both of them are between <code>&lt;br&gt;</code> tags. How can I do this?</p> <hr> <p>In case the site is down, here is an excerpt of some of the HTML from which I wish to extract the phone number and address:</p> <pre><code>&lt;table width="900" style=" margin:8px; padding:5px; font-family:Verdana, Geneva, sans-serif; font-size:12px; line-height:165%; color:#333333; border-bottom:1px solid #cccccc; "&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td&gt; &lt;strong&gt;Alana's Cafe&lt;/strong&gt;&lt;br&gt; &lt;em&gt;Cafe/Desserts &lt;/em&gt; &lt;br&gt; 650 348-0417 &lt;br&gt; 1408 Burlingame Ave &lt;br&gt; &lt;a href="http://www.alanascafe.com/burlingame.html" target="_blank"&gt;http://www.alanascafe.com/burlingame.html&lt;/a&gt; &lt;/td&gt;&lt;td align="right"&gt; &lt;a href="index.cfm?vid=44885" style="text-decoration:none; color:black"&gt; &lt;img src="iconmap.png" height="30" border="0"&gt;&lt;br&gt; Map&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;table width="900" style=" margin:8px; padding:5px; font-family:Verdana, Geneva, sans-serif; font-size:12px; line-height:165%; color:#333333; border-bottom:1px solid #cccccc; "&gt;&lt;tbody&gt;&lt;tr valign="top"&gt;&lt;td&gt; &lt;strong&gt;Amber Moon Indian Restaurant and Bar&lt;/strong&gt;&lt;br&gt; &lt;em&gt;Indian &lt;/em&gt; &lt;br&gt; 1425 Burlingame Ave &lt;/td&gt;&lt;td align="right"&gt; &lt;a href="index.cfm?vid=44872" style="text-decoration:none; color:black"&gt; &lt;img src="iconmap.png" height="30" border="0"&gt;&lt;br&gt; Map&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload