note 29534 added to function.ereg-replace
| From: | schwarzie at sympatico dot ca | Date: | Sun, 16 Feb 2003 20:52:02 +0000 |
| Subject: | note 29534 added to function.ereg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44068@lists.php.net to get a copy of this message | ||
The above example is good if you want to remove comment tags in a file, but what if you wanted to
remove any text between two tags?
For instance,
<script language="JavaScript">
<!--
{Text goes here}
//-->
</script>
Using "<!--([^-]*([^-]|-([^-]|-[^>])))*//-->" removes all content between the two
tages: <!-- and //-->, but I can't seem to get rid of the parent tags.
<script([^-]*([^-]|-([^-]|-[^>])))*script>
THIS ABOVE DOES NOT WORK
--
http://www.php.net/manual/en/function.ereg-replace.php
http://master.php.net/manage/user-notes.php?action=edit+29534
http://master.php.net/manage/user-notes.php?action=delete+29534
http://master.php.net/manage/user-notes.php?action=reject+29534