master
cs 13 lines 624 Bytes
Raw
1 // Copyright (C) Microsoft Corporation. All rights reserved.
2
3 using System.Text.RegularExpressions;
4
5 namespace WslSettings.Helpers;
6
7 public class Constants
8 {
9 public static uint MB = 1024 * 1024;
10 public static Regex WholeNumberRegex = new Regex("^[0-9]+$");
11 public static Regex IntegerRegex = new Regex("^((-[1-9][0-9]*)|([0-9]+))$");
12 public static Regex CommaSeparatedWholeNumbersOrEmptyRegex = new Regex(@"^(([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])[,])*([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])?$");
13 }