Yes, the case is kind of odd/weird.
Suppose I get a return Foo<sub>2</sub> from Control/Model, then I do a
search of Foo2 instead of Foo<sub>2</sub>, but I also need display the
original one. For example, on displaying page, I need add link on the
returns,  which are displayed as it is get from database, links are.
Given the return is 'Foo<sub>2</sub>', I want:
<a href='www.foo.com/?name=Foo)>Foo<sub>2</sub></a>
I think one of solution may be,
<a href='www.foo.com/?name=$:re.sub(r'</?sub>','', 'Foo<sub>2</
sub>')>Foo<sub>2</sub></a>
I wish my poor English describe the case. Is there an alternative good
way to do the work?
Thanks for your all help.

On Aug 11, 11:57 pm, zbouboutchi <[email protected]> wrote:
>   Hi Zak,
>
> I don't know why you want to do this substitution during rendering, it
> seems to me a little odd, but possible ..
> Indeed I'm curious to see why you want to process things like this,
> could you explain your idea ?
>
> Thanks ;)
>
> On 08/11/2010 10:52 PM, Zak wrote:
>
> > Hi All,
> > I have a quick question. Is it possible using re.sub (python module
> > re) in template files? I want to do some substitution dynamically
> > during rendering.
> > Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to