Placeholder in keyword-search possible?

Started by Birdman, March 06, 2021, 04:10:54 PM

Previous topic - Next topic

Birdman

Hello there,

is there a way to put placeholders in a keyword-search? I still have problems with Umlaute (ä/ö/ü) and there is no way to chnage this in Win 10 unless other software is affected. So I am looking for a replacement for the "ä" in "Gewässer", something like this: "Gew?sser". I even tried ASCII-Code, like shown in my comand shell: "Gew├ñsser" but this didn't work.

exiftool -if "$keywords" -sep "," -keywords= "-keywords<${keywords@;$_ = undef unless /XXX|Name1|Name2|Gewässer|See/i}" -overwrite_original D:\Bilder\X_Metadaten\*.jpg
Best regards,

Martin (Birdman)

StarGeek

Use a single dot . to replace a single character.  In RegEx, the dot is the wildcard for a single character.
exiftool -if "$keywords" -sep "," -keywords= "-keywords<${keywords@;$_ = undef unless /XXX|Name1|Name2|Gew.sser|See/i}" -overwrite_original D:\Bilder\X_Metadaten\*.jpg
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Birdman

So easy, thanks for the advice! For one "Umlaut" there have to be even two dots, so "Gew..sser" worked.

If working in Windows and for my understanding: when looking for a "real" dot instead of a placeholder, this has to masked? Like searching for "End of sentence. New sentence" would be something like "End of sentence%%.%% New sentence"?
Best regards,

Martin (Birdman)

Phil Harvey

To look for a real "." use "\." in the regular expression.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).