Matches Activity stops working

activities
studio

#1

Does anyone face issue with Matches Activity??? I used it yesterday to get some data from string, it was working fine. But when I ran the same code today it started giving error. Is this activity not reliable to use???


#2

@s.praachi What is the error that you see? Attach a screenshot if possible.

Thanks,
Rammohan B.


#3

Did the string change?


#4

@s.praachi could you please provide the string and pattern value you want to match?


#5

Attaching the screenshot of error I am getting, as well as the mail text from which I am fetching data through matches activity.

Patter I am using is- “(?<=” + “Claim ID:” + “)(.*?)(?=” +“Replacement” + “)”

Error-


Mail Text
P7-mail


#6

For making the code run, I am using Split function now to fetch the desired string.


#7

HI @s.praachi,
Use the below pattern

Pattern :(?<=Claim ID:)(.*?)(?=Replacement)

For Example
yourstrvalue=“Claim ID: 23423423
Replacement :234234”

youstrvalue=youstrvalue.Replace(Environment.NewLine," ")

Then use the Matches activity

Regards, Arivu :slight_smile:


#8

Thanks a lot @arivu96