Re: Functions in replacement string of eregi_replace
| From: | M. Sokolewicz | Date: | Tue, 11 Jan 2005 10:37:46 +0000 |
| Subject: | Re: Functions in replacement string of eregi_replace | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-206065@lists.php.net to get a copy of this message | ||
Ville Mattila wrote:
Hi there! I'm looking for a workaround to carry out a feature similar to that I could use any PHP function inside the replacement string in eregi_replace (or ereg_replace). I have a set of HTML code with some <h2>-headers. Now I should convert all HTML headers to uppercase strings. As far as I know and have tested, I can't use code like: $newstr = eregi_replace("<h3>([a-z0-9 \.!\?]+)</h3>", strtoupper("\\1")); How could I do that? Ville use preg_replace with the /e modifier