1 2 3 4 5 6 7 8 9 | <?php $str = " Line 1: This is a string Line 2: [img] image_path [/img] Should not be [img] image_path2 [/img] included. Line 3: End of test [img] image_path3 [/img] string."; preg_match_all("~\[img](.+?)\[/img]~i", $str, $m); var_dump($m[1]); |
PD9waHAKJHN0ciA9ICIgCkxpbmUgMTogVGhpcyBpcyBhIHN0cmluZyAKTGluZSAyOiBbaW1nXSBpbWFnZV9wYXRoIFsvaW1nXSBTaG91bGQgbm90IGJlIFtpbWddIGltYWdlX3BhdGgyIFsvaW1nXSBpbmNsdWRlZC4gCkxpbmUgMzogRW5kIG9mIHRlc3QgW2ltZ10gaW1hZ2VfcGF0aDMgWy9pbWddIHN0cmluZy4iOyAKCnByZWdfbWF0Y2hfYWxsKCJ+XFtpbWddKC4rPylcWy9pbWddfmkiLCAkc3RyLCAkbSk7IAoKdmFyX2R1bXAoJG1bMV0pOw==
-
upload with new input
-
result: Success time: 0.01s memory: 20568 kB returned value: 0
array(3) { [0]=> string(12) " image_path " [1]=> string(13) " image_path2 " [2]=> string(13) " image_path3 " } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
array(3) { [0]=> string(12) " image_path " [1]=> string(13) " image_path2 " [2]=> string(13) " image_path3 " }


