Test string against expression?
Rick Miller <[email protected]> Mon, 17 Sep 2012 13:46:32 -0400
| Newsgroups | gmane.comp.python.cheetah |
|---|---|
| Message-ID | <CAHzLAVEAcHvJstnPY8=rwMSJP06ZuSE+ogJt2TvZeB5rDGaT4g@mail.gmail.com> |
Hi All,
Please forgive my ignorance for I am a novice in the area of
templating engines and cheetah. That said, I want to compare a string
in a placeholder against a regular expression (btw, this is in
Cobbler...not sure if it makes a real difference or not). The concept
is as follows:
#if $getVar('name') == '*string*'
#set foo = "bar"
#else
#set bar = "foo"
#end if
What is the best approach to accomplishing this?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/