Try this... it should only print out "Some webpage data"
$text = "
script data.
Some webpage data
another script data
";
print preg_replace('/(.*?)<\/script>/',
'', $text);
Ando Saabas wrote:
> Ok let me explain my problem further some. I need the regular expression to
> purify the html pa
At 05:52 PM 3/14/2002 +0200, Ando Saabas wrote:
>Ok let me explain my problem further some. I need the regular expression to
>purify the html page from script tags:
>I used: $file = eregi_replace("(.*)", " ", $file);
>Now this works fine, until theres a webpage like:
>
>script data.
>Some webpage
Ok let me explain my problem further some. I need the regular expression to
purify the html page from script tags:
I used: $file = eregi_replace("(.*)", " ", $file);
Now this works fine, until theres a webpage like:
script data.
Some webpage data
another script data
so the regexp above replaces
the best you can do is:
-Original Message-
From: Ando Saabas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 9:33 AM
To: [EMAIL PROTECTED]
Subject: [PHP] regular expression for (NOT 'word')
how would i build a regular expression in php that would match
everything but the giv
4 matches
Mail list logo