Remove extra capture group from regex

https://regex101.com/r/bn9IOy/11/
pull/702/head
Bond_009 6 years ago committed by Vasily
parent 12c43cd769
commit c05e8088d6

@ -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;

Loading…
Cancel
Save