Re: [SMARTY] Modifier with preg_replace_callback

From: Date: Fri, 12 Mar 2004 12:15:21 +0000
Subject: Re: [SMARTY] Modifier with preg_replace_callback
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11097@lists.php.net to get a copy of this message
Gabriel writes: > So I think I HAVE to use some regex_replace in > a custom modifier. So here is my problem again: > The function I defined for the callback > doesn't get called. Silly question, but have you checked the code outside Smarty? Eg: if there were no matches being found based on your regexp, then the callback wouldn't be called, so have you tested the same functions with known search text? What happens if you subsitute the preg_replace_callback with preg_replace? (As it stands you should get your email addresses changed to the text "escape_mail"; if it doesn't either your regexp is wrong (looks ok to me) or the input text doesn't look the way you thought it did. Sorry if I'm teaching you to suck eggs here... -- Mark Rogers, More Solutions Ltd

« previous php.smarty.general (#11097) next »