How to extract the data using REGEXs

Hi Team,

I need to extract the data from the paragraph the data is look like this below.

The details that you send to the (“Business”). Subject is not added please send details (“Customer”) and this was the wrong information.

hear I need to extract the details in between (“Business”) and (“Customer”) in the above example I highlighted.

Please let me know if you have any solutions

Thanks
Chethan

Hi @copy_writes ,

Could you check with the regex expression below :

(?<=\("Business"\)).*(?=\("Customer"\))

image

Hi @copy_writes

How about this Regular expression?

System.Text.RegularExpressions.Regex.Match(YourString,"(?s)(?<=\(“Business”\).\s)(.*?)(?=\s\(“Customer”\))").Tostring

image

Regards
Gokul

Thanks for quick response I tried its not work

This Details Professional Services Statement of Work (“SOW”) is made between e International Unlimited Company (“Business”) and WestJet, an Alberta Partnership (“Customer”). This SOW authorizes details to provide Customer with Consulting Services that are subject

Hi @copy_writes

Try with this pattern

(?s)(?<=\(“Business”\)\s)(.*?)(?=\s\(“Customer”\))

Regards
Gokul

Yes this work can you please explain what was the (?s) means

and thanks for the solution

HI @copy_writes

I’m not sure about this but this pattern is : Match the remainder of the pattern of the following

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