Help with regex in below extraction?

anybuddy can give me the regex to select below line excepting the first 3 digits?

101 ENGLISH COMM. A1 A2 A2 09

@Aparna_30

Use this regex

^\d{3}\s(.*)

regex pattern
(?<=[0-9]{3}).*

use
system.text.regularexpression.regex.match(your variable,“(?<=[0-9]{3}).*”).value.trim

Hi @Aparna_30

Input= "101 ENGLISH COMM. A1 A2 A2 09"
Output= System.Text.RegularExpressions.Regex.Match(Input,"(?<=^\d+\s).*").Value

Hope it helps!!

HI,

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=^\d{3}\s).*").Value

Regards,

1 Like

@Aparna_30
if it was always 3 digits
System.Text.RegularExpressions.Regex.Match(str_input,“(?<=\d{3}).*”).value

Hi @Aparna_30

Try this

System.Text.RegularExpressions.Regex.Match(Input,“(?<=\d{3}\s+).*”).Value

image

@Aparna_30

HI @Aparna_30

How about Regular expression

System.Text.RegularExpressions.Regex.Match(INPUTSTRING,"(?<=^\b\d{3}\b)[a-zA_Z0-9 ].*").ToString

image

image

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