erlug
[Top] [All Lists]

Re: [Erlug] php e simil sed regexp

To: erlug@xxxxxxxxxxxxxx
Subject: Re: [Erlug] php e simil sed regexp
From: Maurizio Lemmo - Tannoiser <tannoiser@xxxxxxxxxxx>
Date: Sun, 10 Apr 2005 01:11:56 +0200
* sabato 09 aprile 2005, alle 23:30, Ivan Sergio Borgonovo scrive:
> stampami da patt1 a patt2, escludi il resto.

preg_match_all("/patt1.*patt2/", $text, $result);

che puo` diventare

preg_match_all("/patt1.*patt2/m", $text, $result);

se il $text e` multiline. Ovviamente, $text e` il testo su cui cercare,
e $result, il risultato.

Vedi un po` se fa al caso tuo (ho l'impressione di averla fatta un po`
"facile", e l'orario e` quello che e`).

In ogni caso:
http://it2.php.net/manual/en/reference.pcre.pattern.syntax.php

-- 
                          Maurizio - Tannoiser - Lemmo
                 Founder Member of ERLUG http://erlug.linux.it
-------------------------------------------------------------------------------
Cordelia: "We're all concerned about how gross you look."
Buffy: "I'm touched. Really."
        --Buffy the Vampire Slayer: Killed By Death

<Prev in Thread] Current Thread [Next in Thread>