The fn-Substring(a,b,c) is useful when we start count from the string left side.
What if i want to get the x number of characters from the right side where the strings can have different length?
For example if X=4
The input for:
Abcd-1234
Ab(xyz)1234
Abcdefxyz1234
All need to give the Output as 1234
Substring to Get Certain Number of Letters From The Right
+9
You can use a regular expression. Result will be assigned to a single line text variable:
if you want it to be exactly four digits, use d{4,4} instead of d+.
Thank you Mlauer for your reply,
But sorry couldnt get it to work, or maybe I missed something.
in my example, when i mentioned 1234, i mean any four alphanumiric characters, it doesnt mean the last for letters are always numbers,
also the input string is not always the same size, it can be any number of alphanumeric string
+9
To get 4 last characters of a string use:
.*(.{4,4})$
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.