I need to extract data after the digit, I have given the example input below.
Input: #RG 13828 ABCDEF.HIJKL
Hear I need to expecting only ABCDEF HIJKL
Note: In the input, we have “#RG” as a constant, and it will always be followed by a pattern of a space, digits, and then the value.
I tried using the pattern ((?<=RG#\s)\d+\s(.*)) and it worked, but I prefer not to use it because when printing the value, we would have to write it as “opregex(1).value”. I want to print the output as “opregex(0).value” instead. This way, the increment of 0 by adding 1 will keep changing.
you can try once its working
System.Text.RegularExpressions.Regex.Match(inputstr,“(?<=[#RG]?[0-9]\s).“)
[ABCDEF.HIJKL]
or
System.Text.RegularExpressions.Regex.Match(inputstr,”(?<=#RG \d+\s).”)
[ABCDEF.HIJKL]