Hi team need Regex value of the below string

Hi ,

need regex for below these string

String = [3:32 PM] Pothanakar Prabhakar

“status code=200\rResponse <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">\r\n soap:Body\r\n <m:NumberToWordsResponse xmlns:m="http://www.dataaccess.com/webservicesserver/">\r\n <m:NumberToWordsResult>five hundred </m:NumberToWordsResult>\r\n </m:NumberToWordsResponse>\r\n </soap:Body>\r\n</soap:Envelope>”

in these need five hundread value it is changed dynamically

Kindly help me on that and dont post screen shot .

please send regex on the chat

Hi @Mada_Sai_Krishna

(?<=<m:NumberToWordsResult>).*(?=</m:NumberToWordsResult>)

I hope it helps!!

Your initial case description is not clear due the code snippet is incomplete.

It looks like you are dealing with XML which is defining namespaces. In such a case we would suggest to handle it properly with XML relatied options and not with Regex

XML Extraction - Handling Namespaces (Tableau, Soap, OASIS types) - Help / Community - UiPath Community Forum

Hi @Mada_Sai_Krishna

You can use the below regular expression to extract the required output data.

System.Text.RegularExpressions.Regex.Matches(yourstringinput.ToString,“((?<=\>\s*)[\w\s]+(?=\s*\<))”)

Thank you,

it is helped.

Regrads,
Saikrishna

@Mada_Sai_Krishna

If you got the solution for your question. Please mark it as solution to close the thread.

Regards,

@Mada_Sai_Krishna

It looks like xml and it is not advised to use regex instead we need to use xml parsing and get the data …that way we can get clean data as well

cheers