Regex- Expression

Hi All,

In the below text I need to extract 9591234640 and SU89976

Please find the above details of Shankar

for this I have written regex as:
\d{10}\ *(\n[A-Za-z]{2}(\d{5}))

but when I run this I am getting error.Can anyone guide me on this

@Sharanabasava_Kallur - can you share the error details?

I am not getting error, but I am not getting any output.

try with

System.Text.RegularExpressions.Regex.Match(“YOUR TEXT”, “EXPRESSION”).Value.Trim

maybe you can split the match into the 2 parts:


also use the watch panel / Debug mode to validate pattern and result e.g. with
Regex:Matches(InputString, Pattern)


Check as below attached (16.4 KB)

Mark as solution if this helps


Hi @Sharanabasava_Kallur,

Please find the regex pattern below.


It will give two groups after the match.

PhoneNo = RegexMatch(0).Groups(1).ToString     
SupplierNo = RegexMatch(0).Groups(2).ToString

Warm Regards,
Ranjith Udayakumar

1 Like

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