REGEX builder1

Please help me someone.

My text file contain below data…

Eid: 053
Eid: 03f
Eid: 44d5
Eid: 032
Eid: 67f6
Eid: 567
Eid: 5y7

But I want to get…

053
03f
44d5
67f6
5y7

How can I get this data through REGEX.
Any body tell me the REGEX syntax.

Hi @Deepak_Kumar_Patel ,

You could use the below Regex Expression :

(?<=Eid:).*

You could try using the regex expression in the Matches activity and let us know if it works for your case.

Alternately using the Matches method, the same can be achieved like below :

Regex.Matches(yourStringDataVar,"(?<=Eid:).*",RegexOptions.IgnoreCase).Cast(Of Match).Select(Function(x)x.Value.ToString.Trim).ToArray

This Expression would give the result in the form of Array of String.

Hi,

As your data contains <> and it seems you want to exclude it, the following pattern is better.

(?<=Eid:\s+)\w+

Sample20221101-2.zip (2.5 KB)

Regards,

No I want to exclude the hole row where present <> this symble.
I want 5rows from above 7rows.

Please help me.
Thank you.

HI,

How about the following pattern?

(?<=Eid:\s+)\w+(?=\s+|$)(?!\s+\<)

Sample20221101-2v2.zip (2.6 KB)

Regards,

1 Like

Thank you…

1 Like

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