Fixed possible Regex error

This commit is contained in:
Deantwo 2020-01-21 12:34:57 +01:00 committed by GitHub
parent 3adadb1c63
commit efc6a4d025
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ namespace AsterNET
/// <summary>Line separator</summary> /// <summary>Line separator</summary>
public const string LINE_SEPARATOR = "\r\n"; public const string LINE_SEPARATOR = "\r\n";
public static Regex ASTERISK_VERSION = new Regex( "^Asterisk\\s+\\D*([0-9]+.[0-9]+.[0-9]+|[1-9][0-9]-r[0-9]+|[0-9]+.[0-9]+-cert[0-9]).*$", public static Regex ASTERISK_VERSION = new Regex( "^Asterisk\\s+\\D*([0-9]+\\.[0-9]+\\.[0-9]+|[1-9][0-9]-r[0-9]+|[0-9]+\\.[0-9]+-cert[0-9]).*$",
RegexOptions.Compiled | RegexOptions.IgnoreCase ); RegexOptions.Compiled | RegexOptions.IgnoreCase );
public static Regex SHOW_VERSION_FILES_PATTERN = new Regex("^([\\S]+)\\s+Revision: ([0-9\\.]+)"); public static Regex SHOW_VERSION_FILES_PATTERN = new Regex("^([\\S]+)\\s+Revision: ([0-9\\.]+)");