Re: [PHP] Passing regexp substrings to a function

2004-10-26 Thread Robin Vickery
On Mon, 25 Oct 2004 15:33:59 +0300, Ville Mattila <[EMAIL PROTECTED]> wrote: > Hi there, > > I have a few e-mail templates in a file that should be parsed. A > template can include also some "module codes" that should be replaced by > a return value of a certain function. For example, if the templ

Re: [PHP] Passing regexp substrings to a function

2004-10-25 Thread Octavian Rasnita
Hi, In perl, you can do something like: $string =~ s/---piece of text that contains a certain (VALUE) in it---/&function($1)/gse; This expression replaces its first part with the result of the function "function" called with the parameter "VALUE". Is this what you want? Maybe you can do somethi