note 78170 deleted from function.ereg by nlopess
| From: | nlopess@php.net | Date: | Fri, 05 Oct 2007 12:03:14 +0000 |
| Subject: | note 78170 deleted from function.ereg by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-131132@lists.php.net to get a copy of this message | ||
Note Submitter: patrick dot winter at dpcp dot ca
----
I stumbled across the following regexp testing tool... VERY handy.
http://www.spaweditor.com/scripts/regex/index.php
...perhaps it's already famous?
Allows testing of Perl and Posix style expression functions: ereg ereg_replace preg_match_all
preg_match preg_replace... with a variety of flags.
Allowed a relative regexp n00b as myself to come up with and test out beasts such as:
<?php
function stripAllTags( $s )
{
return eregi_replace( "<[^>]*>", "", $s );
}
?>
..."[^>]"... grr... looks like an Easter island statue tipped on its side...
wouldn't be needed with lazy matching ("*?", ".*?", whatever).