Introduction: This is a detailed page for PHP programming to specify Regular Expressions for different content. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 325728 'rolling = 'no'>
The regular expression in the PHP tutorial specifies the difference content.
*/
$ STR = "{Dede: link text = 'it bubble thup'} http://www.3ppt.com/5j/game/2011/03/04/hs60v3.sisx {/Dede: link}
";
$ Link = array_filter (explode ('{/Dede: link}', $ Str), "filter ");
$ Len = count ($ link );
For ($ I = 0; $ I <$ len-1; $ I ++)
{
$ Tpattern = "/{Dede: link text = '(. *)'}/I ";
$ Ppattern = "/'} (. *)/I ";
Preg_match_all ($ tpattern, $ link [$ I], $ title );
Preg_match_all ($ ppattern, $ link [$ I], $ PATH );
Echo '<a href ='. $ path [1] [0]. '>'. $ title [1] [0]. '</a> & nbsp ;';
}
Function Filter ($ var)
{
If ($ Var = ''| $ Var = '')
{
Return false;
}
Return true;
}
More articles on "How to specify Regular Expressions for different content in PHP programming"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/325728.html pageno: 13.