Im working on regex on c#, and I need to get only a part from the string and exclude all the rest.
var file = "XD_ADX_W_CGX_CLAIMS_2021_07_11.TXT";
I want to only get "CGX_CLAIMS" from above string, XD_ADX is variable, W is static and 2021_07_11 is also variable
I was able to extract the date with the below regex:
Regex r = new Regex(@"[_]\d{4}[_]\d{2}[_]\d{2}[.]", RegexOptions.RightToLeft);
Now I need to extract only CGX_CLAIMS (that is variable.. could be other string)... any idea?
Thank you!!