By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,710 Members | 1,601 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,710 IT Pros & Developers. It's quick & easy.

Getting data in between html tags

P: n/a
Let's say that I have some data like what is listed below. I simply
want to get all of he text that is between the html tags. How would I
do that with regular expressions or any kind of code. Also, I want to
learn how to use regular expressions. What is a good site to get me
started with php?

<tr><td class="yfnc_h" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=30.000000">30.00</a></b></td><td class="yfnc_h"><a href="/
q?s=GMEGF.X">GMEGF.X</a></td><td class="yfnc_h" align="right"><b><span
id="yfs_l10_gmegf.x">17.30</span></b></td><td class="yfnc_h"
align="right"><span id="yfs_c10_gmegf.x"<span class="">0.00</span></
span></td><td class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmegf.x">0</span></td><td class="yfnc_h" align="right">40</
td></tr><tr><td class="yfnc_h" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=35.000000">35.00</a></b></td><td class="yfnc_h"><a href="/
q?s=GMEGG.X">GMEGG.X</a></td><td class="yfnc_h" align="right"><b><span
id="yfs_l10_gmegg.x">4.70</span></b></td><td class="yfnc_h"
align="right"><span id="yfs_c10_gmegg.x"<span class="">0.00</span></
span></td><td class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmegg.x">9</span></td><td class="yfnc_h"
align="right">235</td></tr><tr><td class="yfnc_tabledata1"
nowrap="nowrap"><b><a href="/q/op?s=GME&amp;k=40.000000">40.00</a></
b></td><td class="yfnc_tabledata1"><a href="/q?s=GMEGH.X">GMEGH.X</a></
td><td class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegh.x">1.30</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegh.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegh.x">321</
span></td><td class="yfnc_tabledata1" align="right">1,739</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=45.000000">45.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGI.X">GMEGI.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegi.x">0.20</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegi.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegi.x">149</
span></td><td class="yfnc_tabledata1" align="right">2,195</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=50.000000">50.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGJ.X">GMEGJ.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegj.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegj.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegj.x">170</
span></td><td class="yfnc_tabledata1" align="right">7,631</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=55.000000">55.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGK.X">GMEGK.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegk.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegk.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegk.x">4</
span></td><td class="yfnc_tabledata1" align="right">3,593</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=60.000000">60.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGL.X">GMEGL.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegl.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegl.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegl.x">4</
span></td><td class="yfnc_tabledata1" align="right">2,790</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=65.000000">65.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGM.X">GMEGM.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegm.x">0.02</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegm.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegm.x">10</
span></td><td class="yfnc_tabledata1" align="right">3,899</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=70.000000">70.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGN.X">GMEGN.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegn.x">0.10</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegn.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegn.x">0</
span></td><td class="yfnc_tabledata1" align="right">1,357</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=75.000000">75.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGO.X">GMEGO.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmego.x">0.15</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmego.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmego.x">0</
span></td><td class="yfnc_tabledata1" align="right">256</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=80.000000">80.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGP.X">GMEGP.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegp.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegp.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegp.x">0</
span></td><td class="yfnc_tabledata1" align="right">230</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=85.000000">85.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGQ.X">GMEGQ.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegq.x">0.10</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegq.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegq.x">0</
span></td><td class="yfnc_tabledata1" align="right">214</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=90.000000">90.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGR.X">GMEGR.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegr.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegr.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegr.x">0</
span></td><td class="yfnc_tabledata1" align="right">72</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=95.000000">95.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMEGS.X">GMEGS.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmegs.x">0.10</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmegs.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmegs.x">0</
span></td><td class="yfnc_tabledata1" align="right">60</td></tr></
tbody></table></td></tr></tbody></table><table border="0"
cellpadding="0" cellspacing="0"><tbody><tr><td height="10"></td></tr></
tbody></table><table border="0" cellpadding="2" cellspacing="0"
width="100%"><tbody><tr class="yfnc_modtitle1"
valign="top"><td><small><b>PUT OPTIONS</b></small></td><td
align="right">

Expire at close
Fri, Jul 18, 2008</td></tr></tbody></table><table
border="0" cellpadding="0" cellspacing="0" height="2"><tbody><tr><td
height="2"></td></tr></tbody></table><table
class="yfnc_datamodoutline1" border="0" cellpadding="0"
cellspacing="0" width="100%"><tbody><tr valign="top"><td><table
border="0" cellpadding="3" cellspacing="1" width="100%"><tbody><tr><td
class="yfnc_tablehead1" align="center" width="12%">Strike</td><td
class="yfnc_tablehead1" align="center" width="12%">Symbol</td><td
class="yfnc_tablehead1" align="center" width="12%">Last</td><td
class="yfnc_tablehead1" align="center" width="12%">Chg</td><td
class="yfnc_tablehead1" align="center" width="12%">Bid</td><td
class="yfnc_tablehead1" align="center" width="12%">Ask</td><td
class="yfnc_tablehead1" align="center" width="12%">Vol</td><td
class="yfnc_tablehead1" align="center" width="12%">Open Int</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=30.000000">30.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMESF.X">GMESF.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmesf.x">0.05</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmesf.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmesf.x">0</
span></td><td class="yfnc_tabledata1" align="right">306</td></
tr><tr><td class="yfnc_tabledata1" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=35.000000">35.00</a></b></td><td
class="yfnc_tabledata1"><a href="/q?s=GMESG.X">GMESG.X</a></td><td
class="yfnc_tabledata1" align="right"><b><span
id="yfs_l10_gmesg.x">0.20</span></b></td><td class="yfnc_tabledata1"
align="right"><span id="yfs_c10_gmesg.x"<span class="">0.00</span></
span></td><td class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right">N/A</td><td
class="yfnc_tabledata1" align="right"><span id="yfs_v00_gmesg.x">310</
span></td><td class="yfnc_tabledata1" align="right">1,541</td></
tr><tr><td class="yfnc_h" nowrap="nowrap"><b><a href="/q/op?
s=GME&amp;k=40.000000">40.00</a></b></td><td class="yfnc_h"><a href="/
q?s=GMESH.X">GMESH.X</a></td><td class="yfnc_h" align="right"><b><span
id="yfs_l10_gmesh.x">1.52</span></b></td><td class="yfnc_h"
align="right"><span id="yfs_c10_gmesh.x"<span class="">0.00</span></
span></td><td class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesh.x">222</span></td><td class="yfnc_h"
align="right">2,536</td></tr><tr><td class="yfnc_h"
nowrap="nowrap"><b><a href="/q/op?s=GME&amp;k=45.000000">45.00</a></
b></td><td class="yfnc_h"><a href="/q?s=GMESI.X">GMESI.X</a></td><td
class="yfnc_h" align="right"><b><span id="yfs_l10_gmesi.x">5.63</
span></b></td><td class="yfnc_h" align="right"><span
id="yfs_c10_gmesi.x"<span class="">0.00</span></span></td><td
class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesi.x">150</span></td><td class="yfnc_h"
align="right">3,598</td></tr><tr><td class="yfnc_h"
nowrap="nowrap"><b><a href="/q/op?s=GME&amp;k=50.000000">50.00</a></
b></td><td class="yfnc_h"><a href="/q?s=GMESJ.X">GMESJ.X</a></td><td
class="yfnc_h" align="right"><b><span id="yfs_l10_gmesj.x">10.70</
span></b></td><td class="yfnc_h" align="right"><span
id="yfs_c10_gmesj.x"<span class="">0.00</span></span></td><td
class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesj.x">21</span></td><td class="yfnc_h"
align="right">2,513</td></tr><tr><td class="yfnc_h"
nowrap="nowrap"><b><a href="/q/op?s=GME&amp;k=55.000000">55.00</a></
b></td><td class="yfnc_h"><a href="/q?s=GMESK.X">GMESK.X</a></td><td
class="yfnc_h" align="right"><b><span id="yfs_l10_gmesk.x">15.50</
span></b></td><td class="yfnc_h" align="right"><span
id="yfs_c10_gmesk.x"<span class="">0.00</span></span></td><td
class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesk.x">45</span></td><td class="yfnc_h"
align="right">240</td></tr><tr><td class="yfnc_h"
nowrap="nowrap"><b><a href="/q/op?s=GME&amp;k=60.000000">60.00</a></
b></td><td class="yfnc_h"><a href="/q?s=GMESL.X">GMESL.X</a></td><td
class="yfnc_h" align="right"><b><span id="yfs_l10_gmesl.x">19.70</
span></b></td><td class="yfnc_h" align="right"><span
id="yfs_c10_gmesl.x"<span class="">0.00</span></span></td><td
class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesl.x">10</span></td><td class="yfnc_h"
align="right">45</td></tr><tr><td class="yfnc_h" nowrap="nowrap"><b><a
href="/q/op?s=GME&amp;k=65.000000">65.00</a></b></td><td
class="yfnc_h"><a href="/q?s=GMESM.X">GMESM.X</a></td><td
class="yfnc_h" align="right"><b><span id="yfs_l10_gmesm.x">24.80</
span></b></td><td class="yfnc_h" align="right"><span
id="yfs_c10_gmesm.x"<span class="">0.00</span></span></td><td
class="yfnc_h" align="right">N/A</td><td class="yfnc_h"
align="right">N/A</td><td class="yfnc_h" align="right"><span
id="yfs_v00_gmesm.x">1</span></td><td class="yfnc_h" align="right">21</
td></tr></tbody></table></td></tr></tbody></table><table border="0"
cellpadding="2" cellspacing="0"><tbody><tr><td width="1%"><table
class="yfnc_d" border="0" cellpadding="1" cellspacing="0"
width="10"><tbody><tr><td><table border="0" cellpadding="1"
cellspacing="0" width="100%"><tbody><tr><td
class="yfnc_h">&nbsp;&nbsp;&nbsp;</td></tr></tbody></table></td></tr></
tbody></table></td><td><small>Highlighted options are in-the-money.</
small></td></tr></tbody></table><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tbody><tr><td height="10"></td></
tr><tr><td align="center"><b><a href="/q/os?s=GME&amp;m=2008-07-18">
Jul 10 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Message-ID:
<23**********************************@8g2000hse.go oglegroups.comfrom
Anthony Smith contained the following:
I simply
want to get all of he text that is between the html tags. How would I
do that with regular expressions or any kind of code. Also, I want to
learn how to use regular expressions. What is a good site to get me
started with php?
www.php.net

Start with strip_tags()
http://uk.php.net/manual/en/function.strip-tags.php
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Jul 10 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.