Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.php > #4615
| Path | csiph.com!weretis.net!feeder8.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Detlef Paschke <schabau@t-online.de> |
| Newsgroups | de.comp.lang.php |
| Subject | Re: preg_match ; mehrzeilig |
| Date | Wed, 28 Oct 2020 13:51:33 +0100 |
| Organization | solani.org |
| Message-ID | <rnbpgk$g7n$1@solani.org> (permalink) |
| References | <rnbos4$f2i$1@solani.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Wed, 28 Oct 2020 12:51:32 -0000 (UTC) |
| Injection-Info | solani.org; logging-data="16631"; mail-complaints-to="abuse@news.solani.org" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
| Cancel-Lock | sha1:9lQTGcdJzPQA88F88UNO7VQKfr4= |
| X-User-ID | eJwNyUkBwCAMBEBLpOyRyoGG+JdA5zucCn2GKLDZJxV8liaq7df1P9pjxa7h7TwhbDVZQmZcC00QVg== |
| Content-Language | de-DE |
| In-Reply-To | <rnbos4$f2i$1@solani.org> |
| Xref | csiph.com de.comp.lang.php:4615 |
Show key headers only | View raw
Am 28.10.2020 um 13:40 schrieb Detlef Paschke:
>
> preg_match('/<p id="p02">(.*?)<\/p>/i', $text, $treffer);
>
>
> Wie kann ich es hinbekommen, dass alles was in der html-Datei zwischen
> <p id="p02"> und </p> steht als eine Zeile ausgegeben wird?
Ich habe es gefunden.
preg_match('/<p id="p02">(.*?)<\/p>/si', $text, $treffer);
Einfach noch das "s" und schon geht es.
Für das Archiv:
Das "i" ignoriert Groß- und Kleinschreibung, das "s" Zeilenumbrüche.
Viele Grüße
Detlef Paschke
--
Das "Zitat des Augenblicks" gibt es nur auf
http://www.schabau.goip.de
Meine "Merkzettel"
http://www.helpdesk.goip.de
Back to de.comp.lang.php | Previous | Next — Previous in thread | Find similar
preg_match ; mehrzeilig Detlef Paschke <schabau@t-online.de> - 2020-10-28 13:40 +0100 Re: preg_match ; mehrzeilig Detlef Paschke <schabau@t-online.de> - 2020-10-28 13:51 +0100
csiph-web