how to get last four letters from a string?
Hi @Shravan_KV, Welcome to the Community.
You can use this:
str.Substring(Math.Max(0, str.Length - 4))
The above syntax will not throw an error if the even if the string doesn’t contain 4 characters. You can also refer to the following thread:
Best Regards.
1 Like
Hey
Give a try with
strVar.Substring(strVar.length-4,4)
Regards
1 Like
HI @Shravan_KV
Try with this
System.Text.RegularExpressions.Regex.Match(QueueItem.SpecificContent("Columnname").Tostring.Trim,"\S{4}$").ToString
Regards
Sudharsan
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.