Thank you for the answer, but I believe that in this way I can not continue the activity. Maybe I did not express myself well. I need this information to finish the activity of the uipath academy, after extracting this information they will be inserted in another web page. I was able to extract it, but it is not correct.
Yes correct. I’m following a tutorial and was explained about string manipulation, but otherwise. I’ll try to use your tip (although I did not understand it very well but I’ll try first and if I can not I’ll scream
You can either the easier solution provided by @nadim.warsi (which is what I opted for), or you can use a RegEx expression to pull it with the ‘Match’ expression… but you would need to first format your output to a single line string for easier processing.
Remove line breaks with: yourString.Replace(Environment.NewLine,":") - The “:” will be what goes in place of the line breaks in the new string, which makes it easier to pull out values with RegEx as each variable will broken up by a “:” character. You can use any character in place.
Next, use the Match regex function System.Text.RegularExpression.RegEx.Match(input,pattern).Value to get the variables. Here is the first expression to get the Client ID:
To explain, the positive lookbehind “?<=” expression tells the expression to locate the Client ID: section and look at what is behind it. We’ll grab all the text using “(.*)” which grabs any characters behind it (ignoring line breaks), but we need to ensure we don’t take all the rest of the string so we’ll need to cut it off at a point. We can do that with the positive lookahead “?=” expression which will match anything in the group before it without taking the text contained in lookahead.
You can then apply this same strategy to the others to get the variables as needed. This is just an alternative method to the one outlined above which uses an array to grab each individual variable.
Thanks for the help, now I can continue the activity, after several tests with the previous tips I got the solution. I’ll post if anyone needs help in the same case as me. The learning continues, thank you.
Hi,
Use get text activity. Then split the result using environment.newline
Now u will get 3 results clientid:value as first client name:value as second one like so later split with : then u will get values what u deserve.
For example : the get text activity storied in strtextvalue.
Split(split(strtextvalue,environment.newline)(0),“:”)(1)
This will give client id value
Split(split(strtextvalue,environment.newline)(1),“:”)(1)
This will give client name value.
Split(split(strtextvalue,environment.newline)(2),“:”)(1)
This will give client country value.