Changed version detection regex to allow for certified versions. In my case the version string which didn't work was "Asterisk 11.6-cert7 built by ... "

This commit is contained in:
albertmata 2016-03-18 18:47:42 +01:00
parent 47cd94dfff
commit bb8f13c0f4

View file

@ -18,8 +18,8 @@ namespace AsterNET
/// <summary>Line separator</summary>
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]+).*$",
RegexOptions.Compiled | RegexOptions.IgnoreCase);
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 );
public static Regex SHOW_VERSION_FILES_PATTERN = new Regex("^([\\S]+)\\s+Revision: ([0-9\\.]+)");
public static char[] RESPONSE_KEY_VALUE_SEPARATOR = {':'};