Fetch digits between the text

Hi,

How to fetch all the digits between two identical text.
Please help.

Thanks,
Riya

Can you share the sample input @Riya1

Hi @Riya,

You may use the below expression

System.Text.Regularexpression.Regex.Matches(yourstring,“(?<=\w)\d+(?=\w+)”)

Hi @Gokul001 ,

Please find below:
<d:EMPID>123600145984</d:EMPID>

Hi @Riya1

How about this expression?

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

image

Regards
Gokul

Another Regex expression @Riya1

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

image

Regards
Gokul

Hi @Gokul001 ,

How I can fetch the same from notepad file which contain a large number of data.

Thanks,
Riya

Can you share the sample file @Riya1

Explain it more about your query

it looks like you are processing XML Data. If so, then please share with us the XML sample data and we can check for a solution approach aligned out on XML Data handling.

@Gokul001 ,

<?xml version="1.0" encoding="utf-8"?>https://st1-ggglegp.in/sap/opu/odata/sap/EMP-DETAILS/EMP_ID('776443984')EMP_ID('776443984')----------------------------------------------------------------------------------------------------------etc

Thanks,
Riya

please use the </> format button from the editor or better share it as text file. Thanks