Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
Greeting for the day. I would like to understand, what I'm committing mistake in below formula;
mid([Message],Index([Message], '.',1)-2,(Index([Message], ' ', Index([Message], '.',1))-Index([Message], '.',1))+2)
the formula Index([Message], '.',1); is calculating correctly.
Whereas, Index([Message], ' ', Index([Message], '.',1) is not correctly identifying position. It is not starting the search from the position of Index([Message], '.',1)
for e.g.
abcdefghi xxx.xx.xx.xx ncaf
which should result xxx.xx.xx.xx.
So, the Index([Message], '.',1) returns the position 11, which is correct. Whereas Index([Message], ' ', Index([Message], '.',1) which should return the position 19, but it returns 72.
I believe I'm committing some logical error.
Can someone help me to correct it.
Regards,
Sagar.
Hi everyone,
Greeting for the day. I found the solution to above problem,
mid([Message],Index([Message], '.',1)-2,(FindOneOf([Message], ' ', 2)-Index([Message], '.',1))+2)
FindOneOf help to find the occurrence of the char_set in text. I had ask to search second Occurrence.
I hope this will help someone, who is in need.
Regards,
Sagar.
Hi,
Not sure but try this.
Tab:
load *,
KeepChar(string,'x.') as result;
load * Inline[
string
abcdefghi xxx.xx.xx.xx ncaf
];
exit SCRIPT;
Hi everyone,
Greeting for the day. I found the solution to above problem,
mid([Message],Index([Message], '.',1)-2,(FindOneOf([Message], ' ', 2)-Index([Message], '.',1))+2)
FindOneOf help to find the occurrence of the char_set in text. I had ask to search second Occurrence.
I hope this will help someone, who is in need.
Regards,
Sagar.