Regex to extract text

I am having a text which consist of more unstructured data and I have to extract some name which is in the format like
1.syed
2.raja
And some random text I used the below expression
System.text.regularexpression regex.match(variable name,β€œ(?<=1.)).*”).value
The above regex extracts syed bcoz of that 1. Inside the expression I want to extract all the names like 1. ,2. So I have to use 0-9 how to insert it in this expression

1 Like

buddy you were almost done you know
no worries kindly try with this it works
(?<=[0-9].).*

see
image
image
Cheers @syed1994

did that work buddy @syed1994

No @Palaniyappan I tried its not working

nti
Gfrfdc ghtfh kmnnm. May24
1.syed
2.raja
Vjbvbjb ujytgh
*sdop gtfd. Nkv
rti

This is the sample unstructured text there are more robust data’s so I extracted text between >nti and >rti and the problem is I have to skip Gfrfdc ghtfh kmnnm. May24

Individual matches
(?=1\.).*|(?=2\.).*
image

image

Capture everything
(?=[0-9]\.).*
image

1 Like

system.Text.RegularExpressions.Regex.Match(inputstring,β€œ(?<= [0-9] .).*”).Value
i am using this expression but i am getting a single result as 1.syed

Buddy here is a sample xaml for you buddy @syed1994
regex.zip (2.0 KB)
Cheers

Try this one :slightly_smiling_face:
(?<=\d.).*(?=)