Hi expert,
I use screen scrap activity to get the text, now i want to get special text from it. how can i do this?
first screenshot is the screen in sap ,the second is the text, the data is variable.
Could you do me a favor?
For the above scenario you can split using new line and get the first line. Assuming you are saying mandarin as special char.
string_output = scrapped_string.split({vblf},stringsplitoptions.none)(0)
Else you want to get non English character you can use REGEX options.
Check the following post, it may give you some hint . Regex with Chinese characters
Check the below code and try
Using assign activity
Let us assume str is a string variable and set the value with special character
macthescollection = System.Text.RegularExpressions.Regex.Matches(str,"[*'$\\"",_&#^@]")
String.Join(",",From p In macthescollection
Select Convert.ToString(p))
@ranjith Thanks for your help. i try it but only get one string . The special char is as below marked red. The number of these special char is not fixed. i want to catch them in a collection then split them with ‘/’ . Could you give me more advice?
@Pradeep Thanks for you help. The special char is as below marked red. The number of these special char is not fixed. i want to catch them in a collection then split them with ‘/’ . Could you give me more advice?
May i know what is the issue occurred when you are using my code?
is it not getting special characters?
your input does not have more special characters except “/”. Please add the special character in the regex patter and check whether you getting or not.
Thanks,
Pradeep Sridharan
@Pradeep Thank you. I am not familiar with regex. I will try your code again.