Remove extra capture group from regex

https://regex101.com/r/bn9IOy/11/
This commit is contained in:
Bond_009 2019-01-02 11:03:19 +01:00 committed by Vasily
parent 12c43cd769
commit c05e8088d6

View File

@ -139,7 +139,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
Regex regex = new Regex(@"\s\S{6}\s(?<codec>(\w|-)+)\s{3}");
Regex regex = new Regex(@"\s\S{6}\s(?<codec>[\w|-]+)\s{3}");
MatchCollection matches = regex.Matches(output);
@ -147,8 +147,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
.Select(x => x.Groups["codec"].Value)
.Where(x => required.Contains(x));
//var found = required.Where(x => output.IndexOf(x, StringComparison.OrdinalIgnoreCase) != -1);
_logger.LogInformation("Available {Codec}: {Codecs}", codecstr, found);
return found;