How to get particular data from string manipulation

hi , i have data using screen scrapping the out put is below

12/10/2020, 14:59:31->[sA] Created new EndUser (parent) Opportunity: 0063q00000zhUhLAAU12/10/2020, 14:59:31 EDU>Threshold; EDU Oppt Created; 0063q00000zhUhMAAU. null12/10/2020, 15:09:42Opportunity already exists. EDU/SKU Opportunities would be found & created if applicable.12/10/2020, 15:09:42 EDU>Threshold; EDU Oppt Exist; 0063q00000zhUhMAAU, 0063q00000zhUhMAAU

i have to get data like
1–>EDU>Threshold
2.–>EDU Oppt Created

how to get those 2 data using string manipulation or other method .
can any one help ?

Hi @Anand_Designer,

You can use this regex pattern and after get use some assigns.

Regex Pattern: (EDU).*?(?=;)

First Assign: strFirstEdu = regexOutput(0).toString
Second Assign: strSecondEdu = regexOutput(1).toString

Please check the screenshot.

Regards
Ömer

1 Like

Hi @Anand_Designer

How about this expression?

System.Text.RegularExpressions.Regex.Match(YourString,"(?=EDU).*?(?=;)").Tostring

Regards
Gokul

image

System.Text.RegularExpressions.Regex.Matches(YourString,"(?=EDU).*?(?=;)")(0)
System.Text.RegularExpressions.Regex.Matches(YourString,"(?=EDU).*?(?=;)")(1)

@Anand_Designer

1 Like

Hrello @Anand_Designer
Use Regex and split string manipulation

Output= System.Text.RegularExpressions.Regex.Match(YourString,"(?<=\W\d\d\s)EDU\W\D+(?=;)").Tostring       
--> to get Output=EDU>Threshold; EDU Oppt Exist

Output1=Strings.split(Output,";")(0).tostring        ---> Output1=EDU>Threshold

Output2=Strings.split(Output,";")(1).tostring       ---> Output2=EDU Oppt Exist


image

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.