note 63524 added to function.preg-match-all

From: Date: Thu, 23 Mar 2006 04:18:52 +0000
Subject: note 63524 added to function.preg-match-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-106423@lists.php.net to get a copy of this message
Use this to capture all JavaScript code that is between <script> tags. Takes into account javascript that generates HTML. This one took a while, so I thought I'd share it. $delimeter = '/<script[^>]*>((?:[^<>"\']+(?:"[^"]*"|\'[^\']*\')*)+)<\/script>/i'; Note: For some reason php.net is filtering out my escape characters... If it doesn't work make sure you escape all single quotes and the forward slash. ---- Server IP: 216.194.113.175 Probable Submitter: 68.50.194.31 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php Edit -- http://master.php.net/note/edit/63524 Del: integrated -- http://master.php.net/note/delete/63524/integrated Del: useless -- http://master.php.net/note/delete/63524/useless Del: bad code -- http://master.php.net/note/delete/63524/bad+code Del: spam -- http://master.php.net/note/delete/63524/spam Del: non-english -- http://master.php.net/note/delete/63524/non-english Del: in docs -- http://master.php.net/note/delete/63524/in+docs Del: other reasons-- http://master.php.net/note/delete/63524 Reject -- http://master.php.net/note/reject/63524 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106423) next »