Hi All,
I am new to UiPath.
I need to scrape specific data from below text file -I need the values of each field to perform validations. How can i extract only the values, the field names are constant.
for ID , I need all the 3 values separately.
I am trying it using split function strResultString.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries)
and then in for each tryng to do a substring. But someting is going wrong in the substring function
Hi, welcome to the community!
After you read the text file to a varText variable, you can do like this to a varIds String[] variable: varIds = System.Text.RegularExpressions.Regex.Match(varText, "(?<=ID: ).*").Value.Split(";"c)
you can get every id in a for each activity.
@rv27 Modified your code and was able to extract two values. Similarly rest of the values can be extracted. Please take a look. Thanks! Modified_TextFile.xaml (14.5 KB)
Hello rv27,
In this video I do a lot of stuff with String:
0:35 Examples for Substring functions
4:10 IndexOf and LastIndexOf
5:00 SubString working together IndexOf and LastIndexOf
6:45 Split string by character
8:50 Split string by string
12:00 Lower Case and Upper Case
12:45 Trim
15:05 Compare strings in multiple ways
19:05 Resume of all the String function part