Kevin Keeler <[EMAIL PROTECTED]> wrote:
> $entry_hidden = eregi_replace("<hide>.+</hide>","<hidden>",$entry);
try: $entry_hidden = preg_replace("|<hide>.+?</hide>|i","<hidden>",$entry);
".+" is 'greedy', meaning it consumes as much as text as it can. with
perl-like regular expressions, you can add a trailing "?" which makes
the + and * operators non-greedy.
jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]