Regex statement0

Hi Team
[Possible SPAM]Autoemail - Daily Account Statements (PDF) - (##1680756374797_GFPFD_XXXXXXXXXX_DEL_28022023_D##)
This is my line I want output
Like this :point_down:
1680756374797_GFPFD_XXXXXXXXXX_DEL_28022023_D

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=##).*?(?=##)").Value

Regards,

1 Like

Hi @Kuldeep_Pandey,

For Regex matter, ChatGPT https://chat.openai.com/chat works wonderfully, check below screenshot

\d{13}_[A-Z]{5}_X{10}_DEL_\d{8}_D

Thanks,

HI @Kuldeep_Pandey

How about this expression

System.Text.RegularExpressions.Regex.Match(YourString,"(?s)##(.*?)##").Groups(1)

Regards
Gokul

HI @Kuldeep_Pandey

You can also use this alternative ,Checkout this expression

Split(InputString,"#")(2).Tostring.Replace("#","")

Regards
Sudharsan

"[Possible SPAM]Autoemail - Daily Account Statements (PDF) - (##1680756374797_GFPFD_XXXXXXXXXX_DEL_28022023_D##)".Split("#"c)(2)

image

Check with the updated one @Kuldeep_Pandey

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