photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: hluxem on March 26, 2019, 08:18:16 PM

Title: Regular Expression for no value
Post by: hluxem on March 26, 2019, 08:18:16 PM
Hello,

I want to filter files with no value in location. So I used the filter Metadata Search, selected the location tag and tried to use a regular expression for empty. Thought that's easy, but all I could find in my search is that "^$" or "^.{0}$" should work for an empty string, but I can't make that work. So I used a dot and negated the filter which works fine, just seems backward. Is there an expression or another way to find/specify empty tags directly?

Thanks,

Heiner
Title: Re: Regular Expression for no value
Post by: Mario on March 26, 2019, 09:15:46 PM
Why don't you use the "with value" option and invert?
This gives you all files without a value in the selected tag:

(https://www.photools.com/community/index.php?action=dlattach;topic=8914.0;attach=21338;image)
Title: Re: Regular Expression for no value
Post by: hluxem on March 26, 2019, 09:31:13 PM
Thanks, as I made it work with the meta data search I did not try different options.
I have not done much with regular expressions yet and thought I miss something. I expected there is some easy expression to find an empty value. While I found my work around, I thought I ask as reference for the future.

Heiner
Title: Re: Regular Expression for no value
Post by: Mario on March 26, 2019, 09:38:55 PM
I doubt there is a regular expression for 'nothing'.

The option to filter for files with a value (and optionally invert) has been designed to handle exactly this common case => to find files without value.