Kod
preg_match_all("/<!-- ed:html -->(.*?)<!-- ed:end -->/s", $dane, $tekst);
Tutaj podaję listę flag, jakby ktoś chciał:
Kod
i Case-insensitive matching.
m ^ and $ match next to embedded \n.
s Dot (.) matches newline.
x Ignore whitespace, and allow comments (#) in pattern.
U Inverts greediness of all quantifiers: * becomes lazy, and *?
greedy.
A Force match to start at beginning of subject string.
D Force $ to match end of string instead of before the string-
ending newline. Overridden by multiline mode.
u Treat regular expression and subject strings as strings of
multibyte UTF-8 characters.
EDIT:
Zmieniłem flagę w kodzie, nie zauważyłem że aki00 napisał odpowiedź, a nie chciałem już nowego posta tworzyć.