Subject: Re: [Name Mangler Talk] Variables in advanced snippets?

From: Rob Griffiths <[email-masked]>
Date: Fri, 9 May 2014 05:12:17 -0700

On May 9, 2014, at 4:11 AM, Helma hepabolu <[email-masked]> wrote:

> and I noticed I needed to enter the regular expression to match the filename multiple times. Is there a way to store such a string in a kind of a variable so it can be used over and over again and can also be modified more easily?

As of now, Name Mangler doesn't support user-created variables in Advanced mode. It's on our list for consideration in a future update, though.

regards,
-rob.

---

From: Helma hepabolu <[email-masked]>
Date: Fri, 9 May 2014 04:11:24 -0700 (PDT)

I was creating an advanced snippet (my first) based on this 
one: https://groups.google.com/forum/#!searchin/name-mangler-talk/date$20names/name-mangler-talk/V8czkoN22iE/zzxzipaOHEMJ

and I noticed I needed to enter the regular expression to match the 
filename multiple times. Is there a way to store such a string in a kind of 
a variable so it can be used over and over again and can also be modified 
more easily?

I know it's silly to do it this way, but here's an example of what I mean:

var @myregex = '(\d{2})-(\d\d)-(\d{4})'

[concate 
  [findRegularExpression @myregex
     in <name>
    and replace "$3"
  ],
  "_",
  [findRegularExpression @myregex
     in <name>
    and replace "$2"
  ]
] 

Thanks for an awsome app.

Bye, Helma