On Jul 27, 12:09 pm, weepy <[EMAIL PROTECTED]> wrote:
> $s = function(s) {
>   p = s.replace(/#{/g, "' + eval(").replace(/}/g, ") + '")
>   p = "'" + p + "'"
>   return eval(p)
> }

i almost went cross-eyed matching up the ' and " chars in that
s.replace() call. It's almost as readable as Perl code. Slick, though.

i'd recommend adding semicolons to the end of each line or the code
probably won't work properly when packed/jsmin'd.

Reply via email to