Hi. Thanks for the info. If i want to extract the last 3 characters of a string at once, how i do this?
Making right(text, 3) right(text, 2) right(text, 1), making right(text, 3)? or other thing?
If i want to extract (counting from right to left) character 3 and 4 at once?
Note that right(text, n) gets n characters starting at the last character of the string and going backwards, like left(text, n) gets n characters starting at the begining of the string and going forward.
If you need to get a certain amount of characters in the middle of a string you should use mid(text, start, n), which will return n characters starting at start and going forward.
Thus, if you need to return the 3rd to last followed by the 4th to last you would need to use mid(0 twice and join the characters toghether:
Examples
To get the last 3 characters, "ium" in the example below, you must do the following:
myString = "Avengium";
myCharacters = right(myString, 3)
[/code:28xs41ez]
To get the 3rd and 4th to the last, "ig" in the example below, you must do the following:
[code:28xs41ez]
myString = "Avengium";
myCharacters = mid(myString, len(myString) - 3, 1) & mid(myString, len(myString) - 4, 1)
[/code:28xs41ez]