Replacing tilde

Started by Aubrey, October 06, 2019, 01:00:34 PM

Previous topic - Next topic

Aubrey

Quick one: yes/no! If no then I'll figure it out with regex.

Is there an escape sequence to replace tilde (~)

for example:
{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~Where|==}

I'm always left with residual "~"
I've tried \~ and ~~ without success.

Mario

No. Unfortunately you have picked the only escape character available to IMatch variables as part of your keywords. There is no escape for this escape.
~ means in variables: Interpret the following character literally, ignoring any special meanings. So, ~; means: "Ignore the special meaning of ; and just place a ; in the text" => ~; becomes ;
You are trying to escape ~~, which of course results in ~ being emitted.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Aubrey

#2
Hmmm, looks like I'm out of luck  ??? I've tried a few workarounds, length substr etc. Problem is I cannot embed "length" in "substr"

I think I'll just live with what I have! I know I could change ~Where to 1_Where, or some such; then keywords need to be written back to files.

Any features in 2020 that may allow me to remove ~ ?

Aubrey.

Mario

Just use the Metadata Mechanic app.

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