Extract desired text from String

Team,
Can anyone suggest from string extraction as below :

Input -
Subject :PEX Job Failed Verify PRODUCTION 14562734 Body :Z0640702N.20221109.d01.20221109.010042.PR1.PRN.ps has failed

Job Received: 2022-11-09 06:27:00.02
Statement Type: d01_Statement
Client ID: Z0640702

Client Name: First Montana Bank 063 - 102882

Output -
14562734

Hi @prerna.gupta

Please use String left/right activity if value required is between production and body always

cheers

HI @prerna.gupta

Checkout this expression

System.Text.RegularExpressions.Regex.Match(StrVariable,"\d+(?=\sBody)").ToString

Where StrVariable = Your input
Regards
Sudharsan

1 Like

HI @prerna.gupta

How about this expression

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=PRODUCTION\s)\d+").Tostring

image

Regards
Gokul

Thanks much.

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