How to take first x characters of string?

Hi everyone,

I’ve been looking around the forums, and although I have been able to find topics like how to split string into characters, I was not able to adapt their solutions for my slightly different problem: I don’t want to split when encountering a certain character, rather I want to split on encountering a certain character limit. So I want to be able to break it down into say groups of 50 characters or so, I’ve been trying to figure out how to do it but I’m very new to UIPath and have been unable to find a solution. Any help would be greatly appreciated.


You can do most things with string manipulation through in UiPath, so there are various sources out there online to figure out how to do something like this.

One approach would be to use Regex.Matches() to create an array of any character up to certain length


The above example would split the string by 10 characters using the pattern “(.*){10}”

Hi, I need help
I want to take the first 3 letters from a phone number (string variable) in a data table
I know how to get to the right column, the only problem for me is how to take the first 3 chars

thank u


1 Like

but I found the .substring(0,3)
but good to know there is another option

1 Like