I am trying to get Regex to match something like this:
__X__Y__
__X_x__Y__
etc
in particular, I want the content between those "__", so in the first example I will get X and Y, while in the second example I should get "X_x" and Y.
So far I have got to the following Regex:
Regex X = new Regex(@"__(?<object>[\w]+?)__");
This match __X__ and __X_x__, etc, and I can refer the content through the group name "object". But I dont know how to go on from there.
Is there someone out there that can point me in the right direction?
Many Thanks.
__X__Y__
__X_x__Y__
etc
in particular, I want the content between those "__", so in the first example I will get X and Y, while in the second example I should get "X_x" and Y.
So far I have got to the following Regex:
Regex X = new Regex(@"__(?<object>[\w]+?)__");
This match __X__ and __X_x__, etc, and I can refer the content through the group name "object". But I dont know how to go on from there.
Is there someone out there that can point me in the right direction?
Many Thanks.