v1/folders using reg exp. Correct syntax?

Started by ubacher, July 31, 2017, 06:26:46 PM

Previous topic - Next topic

ubacher

I am trying to get the folder(s) whose name contains a certain string (2017 here, for testing)
How do I specify the regular expression correctly?

IMWS.get('v1/folders', {
                    regexp: '{path},'+'2017'
                }).then(function (response) {

Mario

What is {path} ?

Remember to take care for any character which has a special meaning in regular expressions, e.g. \ or . etc.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

The instructions say:
QuoteSyntax: {name|path|desc},regular expression. The where part controls to which folder attribute the regular expression is applied. The regular expression is a standard IMatch regular expression.

Sorry - but how do I interpret these instructions? I thought I had to specify to which part the reg exp applies. Thus the {path}.
For testing I chose "2017" to avoid any special characters.

Mario

path,<regular expression here>

{a|b|c}   means: Chose one of.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Thanks. There was no example around to help.

Mario

Well. I'm not perfect. If you care to look at the mountain of code and documentation I have created and shipped with IMatch 2017 it is a true miracle that I have not missed more.
Just write a FR for more info, or write the better info yourself and I will incorporate it. If some people would help out with the docs I would welcome it. I'm only human and even my days have only 48 hours.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

I always worry that I might bother you, Mario, with questions that I might have been able to answer myself.
I realize that you are busy and appreciate your answers so much the more.

When I said There was no example around to help. then it was meant as an explanation why I asked.

Mario

I'm fleshing out the documentation all the time. There are limits of what I can do directly in the /discover documentation because that it auto-generated.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook