Re: Regular expressions and input with parentheses
Chris Travers <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <CAKt_Zft+5Yy_QGUW1NhwjDacWJosVkMVPhVy2krKA3MUEpggCQ@mail.gmail.com> |
On Fri, Feb 17, 2012 at 6:08 AM, Ronald J Kimball <rkimball-jkI2qz8QNLsmlAP/[email protected]>wrote: > 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]') %] > > The original issue was with list.grep(variable) where variable might have ( and ) in it. I just replaced it with a FOREACH IN and that fixed it. Best Wishes,. Chris Travers _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates