Welcome Guest, Not a member yet? Register   Sign In
regular expression help
#7

[eluser]megabyte[/eluser]
Looking fro help to get link description that is between a font tag. There are many links per page so I am doing this. It obviously doesn't work. Can someone please help? All I am getting is the very last instance found and not all of them.

Code:
//html to search for:
//<font color="#000000" face="Verdana" size="2"> link descriptions go here</font>
&lt;?php
preg_match_all ("|size=\"2\">(.*?)</font>|",
                    $var, &$matches);


$matches = $matches[0];
    $list = array();

    foreach($matches as $var)
    {    
        print($var."<br>");
    }
?&gt;

there are other font tags in the pages so I need to search for just this specific one.

I'm having so many issues wrapping my head around this stuff.


Messages In This Thread
regular expression help - by El Forum - 06-26-2007, 02:41 PM
regular expression help - by El Forum - 06-27-2007, 01:17 AM
regular expression help - by El Forum - 06-27-2007, 06:23 AM
regular expression help - by El Forum - 06-27-2007, 09:21 AM
regular expression help - by El Forum - 06-27-2007, 10:42 AM
regular expression help - by El Forum - 06-27-2007, 11:19 AM
regular expression help - by El Forum - 07-10-2007, 04:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB