Position of a string within a variable

Started by Pawel, January 29, 2022, 05:48:42 PM

Previous topic - Next topic

Pawel

I've read the help file and somehow cannot find how can I find position of a string within a variable? I would like to do substr on a variable from the start up to this string's position.

So far the only way to get a first part (up to the '/' character) of a tag (Circa Date Created in this case) with values like:
2021-07-17/2021-07-31
1961?/1968
2019-08/2019-12-31


is a formula like this:
{File.MD.XMP::iptcExt\CircaDateCreated\CircaDateCreated\0|replace:/==~;;foreach:{index|is:0,{value},,}}

but I hope there is a better/simpler way?

Mario

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