Hi team,
I am new to uipath
I want to extract particular text from :
Service: AB_CDE_CGHY_CTR_CNTROL 1 not found
From the above text i want to extract only AB_CDE_CGHY_CTR_CNTROL and save into excel file.
Please help me with this .
Hi team,
I am new to uipath
I want to extract particular text from :
Service: AB_CDE_CGHY_CTR_CNTROL 1 not found
From the above text i want to extract only AB_CDE_CGHY_CTR_CNTROL and save into excel file.
Please help me with this .
You can try with regex expression
System.Text.RegularExpressions.Regex.Match(YourString,"(?<=Service:\s)(\S+)").Tostring
Regards
Gokul
Hi @Gokul001
I didnt get exactly
Hi @Gokul001
I want to extract from this below string
Service: AB_CDE_CGHY_CTR_CNTROL 1 not found / ICF Node: -
Service: MM_PUR_CNTRL_CTR_MONITOR 1 not found / ICF Node: -
The above expression is working
Output :
AB_CDE_CGHY_CTR_CNTROL
MM_PUR_CNTRL_CTR_MONITOR
Regards
Gokul
Try with Trim
System.Text.RegularExpressions.Regex.Match(YourString.Trim,"(?<=Service:\s)(\S+)").Tostring.Trim
Regards
Gokul
I need to use Match activity and then inside i need to use these regex right?
Can you please share me the xaml file?
Now we have 2 services to extract and sometimes i need to extract more than 2 services .So for every dynamic output this regex works right?
Yes it will work if the input string is in this below format
Regards
Gokul
Ok before adding match activity i need to use get text activity right? to get the above text
Yes @Bhagyashree_S
And pass the get text activity output variable to Match activity as an input
Regards
Gokul
Hi,
i have only one error so indicating 1st line…what if i have more number of errors and how to indicate all those using get text…The output will be dynamic sometimes
Can you share the Get Text activity screenshot of the selector in ui explorer and in the SAP portal.
Regards
Gokul
Have you test the process with double line are more?
Instead of using Get Text activity have you tried with Screen scrapping activity.
Regards
Gokul
Hi @Gokul001
i have used screen scrapping also but it will scrape only the selected text and how should bot know that if more error occurs and it should fetch only those error lines.
Can you share the selector that you have indicated in the 2nd error line.
Regards
Gokul