Here is the text.
I need the easiest way to do it
Here is the text.
I need the easiest way to do it
Hi @170290064
First, use the Get text activity to extract the data and store in a Variable called Input_Str.
- Assign -> ClientID [String Datatype] = System.Text.RegularExpressions.regex.Match(Input_Str.toString,"(?<=Client ID:\s+).*").Value
- Assign -> ClientName [String Datatype] = System.Text.RegularExpressions.regex.Match(Input_Str.toString,"(?<=Client Name:\s+).*").Value
- Assign -> ClientCountry [String Datatype] = System.Text.RegularExpressions.regex.Match(Input_Str.toString,"(?<=Client Country:\s+).*").Value
Check the below workflow for better understanding,
Regex_Practice.xaml (14.7 KB)
Note : Check the output in the Immediate panel in the above image.
Hope it helps!!
Hi @170290064
Can you try the below
inputString = " Client Information Details
Client ID: HR70321
Client Name: Clement Paulette
Client Country: Romania "
clientId = inputString.Split({"Client ID:"}, StringSplitOptions.RemoveEmptyEntries)(1).Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries)(0).Trim()
clientName = inputString.Split({"Client Name:"}, StringSplitOptions.RemoveEmptyEntries)(1).Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries)(0).Trim()
clientCountry = inputString.Split({"Client Country:"}, StringSplitOptions.RemoveEmptyEntries)(1).Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries)(0).Trim()
Cheers!!
clientInfoArray = lines.Skip(1).Select(Function(line) line.Split(":")(1).Trim()).ToArray()
Use For Loop To get the Items or simply Use clientInfoArray(0)to get the first item,clientInfoArray(1) and so on
@170290064
Assign: FirstVariable = Split(outtext.split(Environment.Newline.ToArray(),StringSplitOptions.RemoveEmptyEntries)(0),": ")(1).ToString
use for each activity
From website i guess you would get all data together
Then you can wither use split or regex to get the required data
Cheers
Hey @170290064
For Client ID Use this in assign activity
yourclientidvar=system.text.regularexpressions.regex.match(yourintputfromwebsite,β(?<=Client ID:)(.)*β).tostring
for client name
yourclientnamevar=system.text.regularexpressions.regex.match(yourintputfromwebsite,β(?<=Client Name:)(.)*β).tostring
for client country
yourclientcountryvar=system.text.regularexpressions.regex.match(yourintputfromwebsite,β(?<=Client Country:)(.)*β).tostring
Regards
Sreejith S S
I hope you find the solution for your query⦠@170290064
If yes Make my post mark as solution to close the loop, else If you have any queries let us know.
Happy Automation!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.