CopyCode The Code is as follows :/*
1 (? S) indicates Pattern. dotall, that is, match the line feed, allowing the IMG to appear in multiple lines
2 .*? Indicates that non-greedy matches any character until the following conditions appear.
3? : Indicates that the match is not captured, that is, [\. gif | \. JPG] does not appear in the result.
*/
$ Pattern = "/ /";
$ STR = '<P style = "padding: 0px; margin-top: 0px; margin-bottom: 0px; line-Height: 200%; "> </P> <P style =" padding: 0px; margin-top: 0px; margin-bottom: 0px; line-Height: 200%; "> </P> <P style =" padding: 0px; margin-top: 0px; margin-bottom: 0px; line-Height: 200%; "> </P> ';
Preg_match_all ($ pattern, $ STR, $ match );
Print_r ($ match );
/*
Array
(
[0] => Array
(
[0] =>
[1] =>
[2] =>
)
[1] => Array
(
[0] => upfiles/2009/07/1246430143_4.jpg
[1] => upfiles/2009/07/1246430143_3.jpg
[2] => upfiles/2009/07/1246430143_1.jpg
)
)
*/