Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Expression Interpolation from input "template string"?

Reply
Thread Tools

Expression Interpolation from input "template string"?

 
 
Peter Fitzgibbons
Guest
Posts: n/a
 
      10-18-2005
Hello all,

I have a set of "template messages" from a database table that I want
to go something like this :

"Hello, today is #{msgDate}"

What I don't know is how to get the interpolation to work when the
string is read from teh database as if :

x =3D 'Hello, today is #{msgDate}' <<=3D=3D note the single quotes

Have any ideas ?

Thanks.

Peter Fitzgibbons


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linear interpolation in vhdl df84077@gmail.com VHDL 8 10-07-2011 08:38 AM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C++ 42 11-04-2008 12:39 PM
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" Adem C Programming 45 11-04-2008 12:39 PM
Variable interpolation and m in regular expression matching Josef Moellers Perl Misc 8 01-23-2008 12:13 PM
modifying html input date for mysql, reg ex or string interpolation? Kun Python 2 04-11-2006 11:17 PM



Advertisments