Re: Regular expressions and input with parentheses

Ronald J Kimball <rkimball-jkI2qz8QNLsmlAP/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <CAEnkCGQoBdAeA1xdojNR1j2dMV1f8=7FXvaBEZmEwxE2Cp_2wQ@mail.gmail.com>
On Fri, Feb 17, 2012 at 4:09 AM, Chris Travers <[email protected]>wrote:

> Hi all;
>
> What's the best way to handle regular expressions (replace filter) where
> the text to be matched may include parenteses?
>

I think your question is not very clear.  Do you have an example of what
you're trying to accomplish?

Here's a simple example using the replace filter with text that includes
parentheses:

[% 'abc(def)ghi' | replace('\(.*\)','[123]') %]

Ronald

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.