Explorar el Código

Change regex to multiline

ex: https://regex101.com/r/bn9IOy/12
Bond_009 hace 6 años
padre
commit
d6f3ca859e
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1 3
      MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs

+ 1 - 3
MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs

@@ -139,10 +139,8 @@ 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+.+$", RegexOptions.Multiline);
             MatchCollection matches = regex.Matches(output);
-
             var found = matches.Cast<Match>()
                 .Select(x => x.Groups["codec"].Value)
                 .Where(x => required.Contains(x));