The Substring method is used to extract a part of a string based on a specified starting index and length. The syntax of the Substring method is:
string.Substring(startIndex, length)
where startIndex is the zero-based position of the first character in the substring, and length is the number of characters in the substring. For example, if the string is “Hello”, then string.Substring(1, 2) will return “el”, as it starts from the second character (index 1) and takes two characters.
To return four characters starting with the second character, the startIndex should be 1 and the length should be 4. Therefore, the expression should be:
StrVar.Substring(1, 4)
[: Substring and How to manipulate a part of string: Split, Trim, Substring, Replace, Remove, Left, Right from UiPath documentation and forum., , ]
Submit