I am trying a couple of regex´s to try to extract a txt from a file.
I try with this example with no sucess
lets say I have this string:
This is _localizer["my test 1."]' (here I want 'my test 1.')
or
This is _localizer["my test 2."] And this is _localizer["my test 3."]' (here I want 'my test 2.' and 'my test 3.')
In other others, the regex need to understand the begin anchor (_localizer[") and the end anchor ("]) and need to know that sometime there are multiple 'localizer' in the same line.
In the txt I want to extract sometimes will have / or \ and others characters that may will make regex fail.
What I am trying to do:
Regex r = new Regex(@"_localizer[(.+?)]");
var matches = r.Matches(txt)
.Select(xx=> xx.Value)
.Distinct();
cheers