Assuming you have the file name in a string variable, now we can use string function to achieve the desired substring.
Use find(filename, '.') to find the index of first occurrence of “.” in the string. After this substring(filename, indexOfFirstDot) gives you the remaining string.
Repeat this way to find the indices of your second “.” and third “.”
Now you can simply get the required portion of the string with something like
substring(filename, secondDotIndex, thirdDotIndex-secondDotIndex)
Again, asking the same question a third time doesn’t work ;-)
See my new comment in your original post: https://forum.mendix.com/link/questions/103039
Also, you are using an XPAth, which is about retrieving data from the database, while you want to extract a substring from already available data. In that case you need to use (microflow) expressions → see my answers in your first post
If you need to extract 3 source from string you can use below approach.
you will get first source from below.
substring($APISource,0,find($ChatHistory/APISource,'[2]:'))
you can chek third source exist or not using below.
find($APISource,'[3]:')
if exist then you can extarct second source from below
substring($APISource,$SecondSourceexist,$ThirdSourceexist-$SecondSourceexist)
Than extract third source from below.
substring($APISource,find($ChatHistory/APISource,'[3]:'))