PHP uses regular expressions to intercept characters "help"
Which expert to help see: I want to extract from the following code
{Dede:field name= ' keywords '} {/dede:field}
{Dede:field name= ' description '} {/dede:field}
{Dede:field name= ' title '}http://down.sucai.com/fonts/soft/071130/1_071204075903.rar{/dede:field}
{Dede:field name= ' writer '} {/dede:field}
{Dede:field name= ' source '} {/dede:field}
{Dede:field name= ' body '} {/dede:field}
{Dede:field name= ' pubdate '} {/dede:field}
{Dede:field name= ' litpic '}/uploads/allimg/c100112/12632b9420z-412413.jpg{/dede:field}
This one
Http://down.sucai.com/fonts/soft/071130/1_071204075903.rar
And
/uploads/allimg/c100112/12632b9420z-412413.jpg
How do you write a regular?
------Solution--------------------
PHP Code
$str = < <
------Solution--------------------
$s = <<< HTML
{Dede:field name= ' keywords '} {/dede:field}
{Dede:field name= ' description '} {/dede:field}
{Dede:field name= ' title '}http://down.sucai.com/fonts/soft/071130/1_071204075903.rar{/dede:field}
{Dede:field name= ' writer '} {/dede:field}
{Dede:field name= ' source '} {/dede:field}
{Dede:field name= ' body '} {/dede:field}
{Dede:field name= ' pubdate '} {/dede:field}
{Dede:field name= ' litpic '}/uploads/allimg/c100112/12632b9420z-412413.jpg{/dede:field}
HTML;
$p = ' #} (. +) {# ';
Preg_match_all ($p, $s, $r);
Print_r ($r [1]);
Array
(
[0] = Http://down.sucai.com/fonts/soft/071130/1_071204075903.rar
[1] =/uploads/allimg/c100112/12632b9420z-412413.jpg
)