Media & Folders Vs. @RFolderRegExp

Started by Darius1968, December 24, 2017, 07:49:04 AM

Previous topic - Next topic

Darius1968

I was seeking the consolidation of files to folders that had both strings of text, "Jackie" & "2017".  For example: 
E:\_01\_Backups\_201309 (C Drive)\00\_Family\_Lawyers\Aligned Partners\Jackie\2017\

I found that a formula category like this isolated the files splendidly: 
"@RFolderRegExp[^(?=.*2017)(?=.*jackie).*$]"

I tried the regular expression that I used in the formula category (^(?=.*2017)(?=.*jackie).*$), in the filtering of the Media & Folders, with Regular Expressions enabled, with the result being that of an empty set. 

Why is it that the same Regex that was perfect for a formula category based on folders, would be useless in the Media & Folders filtering? 

Mario

IMatch uses PERL regular expression (as implemented by the Boost library), JavaScript uses a different regexp implementation. There may be differences in syntax. Please consult the documentation for each implementation (see links in the IMatch help for PERL, see MDN for JavaScript) to learn about the differences. I'm no regular expression expect and a expression like the one you show is already past anything I've ever needed.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

Are you saying that between PERL & JavaScript, the filtering in the Media & Folders and the Categories DB views use one kind of Regex, while the Regex for filtering in the search bar, global filtering, as well as in Data Driven/Formula categories, is of the other kind?  When IMatch enumerates the folder structure with a tree in Media & Folders view, deriving it from a regular expression, is the info coming from the same source as when things like Data Driven/Formula categories, search bar/global filtering are in use? 

Mario

#3
IMatch always uses the same regular expression engine.

I understand from your original post that you use a regular expression in a category and that this gives you a result / no result?
I understand from your original post that you use a regular expression from your script and that this gives you a result / no result?

Show how you call the endpoint in your code.

The syntax for the /folders endpoint for the regexp is

regexp:<where>,<what>

What did you specify for this parameter?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

You misunderstood my 1st post in that I did not write any script!  That post states that I used a formula category (@RFolderRegExp[^(?=.*2017)(?=.*jackie).*$]), with the regex (^(?=.*2017)(?=.*jackie).*$) as the argument.  This proved very successful in getting me each and every file, and only the files that resided in a folder that had both terms, "2017" & "Jackie" in the path, like "E:\_01\_Backups\_201309 (C Drive)\00\_Family\_Lawyers\Aligned Partners\Jackie\2017\".

If I try to carry this over to the filtering of the Media & Folders view, I have no success in entering "^(?=.*2017)(?=.*jackie).*$" into the text entry box, with "Regular Expressions" enabled. 

Mario

#5
As far as I recall the filter works on the leaf level. You are probably trying to filter for the entire path. Different things, different purposes.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Specify to search all metadata. Then the folder is included. I did that recently, that's why I know.

Darius1968

Ubacher, "specify to search all metadata", I know, is available if I'm doing a global filtering of my whole database, but where do/can I find this option, if I'm in the Media & Folders view? 

Mario

The search and filter panel in the media and folders via cannot search metadata.
This filter exists to allow a user to quickly find a specific folder in the tree, or to temporarily show only folders containing specific characters to reduce the number of folders displayed.


I have tried the regular expression:

^(?=.*2017)(?=.*jackie).*$

and it finds the folder

D:\data\images\test\Jackie 2017

on my system. It does not find

D:\data\images\test\2017\Jackie

because, as I said above, it only looks at the leaf level ("Jackie 2017" or "Jackie") and not the entire folder path.



-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook