Re: [SMARTY] Escaping the curly braces

From: Date: Fri, 09 Aug 2002 15:29:27 +0000
Subject: Re: [SMARTY] Escaping the curly braces
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5629@lists.php.net to get a copy of this message
That isn't possible since it's not a literal but a variable modifier. Here's what I'm trying to do: {$some_variable|regex_replace:"/^\d{4}([a-z]|[A-Z]){2}$/":"<replacement>"} I cannot use {literal} inside a smarty section. I just need to escape the curly braces. Maybe I want to much :-) thanx for your help anyway. On Friday 09 August 2002 16:57, Sean Chambers wrote: > Use the following: > > {literal} > > {/literal} > > All curly braces within those tags will be ignored > > -----Original Message----- > From: David Pavlotzky [mailto:david@djin.com] > Sent: Friday, August 09, 2002 10:33 AM > To: smarty-general@lists.php.net > Subject: [SMARTY] Escaping the curly braces > > > Hi, > > Is there some way to escape the curly braces {' }' ? > I'm trying to use > > regex_replace in my template but, not surprisingly, smarty barfs on the > curly > braces that I need in my regexp. It's a regexp to verify dutch postal > codes > and it looks like this: > > /^\d{4}([a-z]|[A-Z]){2}$/ > > thanx for helping me out. > > David

« previous php.smarty.general (#5629) next »