Extracting string using Regex in mailbody

Hi UiPath,

I am trying to extract a ticketID containing’s alphanumeric characters .

let say inside a body of each email.

I would like to extract the ticket ID?

let say I have this ticket ID string below:

Ticket ID: SG0179393
Requestor: Test Requestor
PO Number: 4505975231
Remarks: Pending to Release

This string is inside the email body.

Thanks!

Hi @alvin.c.apostol26

You can try this regex

image

(?<=Ticket ID: )[A-Z]{2}\d{7}

HI @alvin.c.apostol26

Try with regex expression

System.Text.RegularExpressions.Regex.Match(Inputstr,"(?<=Ticket\sID:\s)(\S+)").Tostring

Regards
Gokul

HI,

Hope the following help you.

System.Text.RegularExpressions.Regex.Match(strMailBody,"(?<=Ticket ID: )\w+").Value

Sequence.xaml (5.4 KB)

Regards,

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