Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Frank Arensmeier
10 okt 2006 kl. 19.25 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200: Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. preg is obviously short for Perl REGular expressions, while PCRE positively means

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 09:52:51 +0200: 10 okt 2006 kl. 19.25 skrev Roman Neuhauser: # [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200: Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. preg is obviously short for Perl

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Frank Arensmeier
Thanks again for your suggestions. Actually, - believe it or not - I have never written a class (I am still learning PHP after three years working with that language). So I am not quite sure of the benefits of your class. One thing I do realise is the benefit of replacing the foreach loop

Re: [PHP] ereg_replace with user defined function?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 14:28:21 +0200: Actually, - believe it or not - I have never written a class (I am still learning PHP after three years working with that language). So I am not quite sure of the benefits of your class. Nevermind then. I don't know how to fit my

Re: [PHP] ereg_replace with user defined function?

2006-10-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-09 22:01:34 +0200: Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. preg is obviously short for Perl REGular expressions, while PCRE positively means Perl-Compatible Regular Expressions. The

Re: [PHP] ereg_replace with user defined function?

2006-10-09 Thread Frank Arensmeier
Thank you Ilaria and Roman for your input. I did not know that preg is able to deal with PCRE patterns. As a matter of fact I came up with the following solution (if someone is interested): the function takes a text and an array with converters like: $converters[] = array ( metric = mm,