Hi devs, pls how do I extract the last 3 xters excepting the last 1 character from this string.Example I have “Porridge” and I want to get “idg”
“School” to get “hoo”
Try below expression.
strInput.Substring(strInput.Length-4,3)
Here strInput variable holds your input string.
2 Likes
Hi @RPA-botDev,
A dynamic alternative : Left(Right("Porridge",4),3)
This takes four last characters first, then it takes the first 3 characters.
Left(Right("School",4),3)
2 Likes
Hi Lakshman, is there a dynamic variable holding 4, or for all strings I should add length-4?
handling too short strings as well
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.