|
|
@@ -2,6 +2,7 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Text; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
|
namespace Learun.Util |
|
|
|
{ |
|
|
@@ -145,5 +146,19 @@ namespace Learun.Util |
|
|
|
return str; |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region 验证字符串的格式 |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 是否是手机格式 |
|
|
|
/// </summary> |
|
|
|
/// <param name="mobile"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public static bool IsValidMobile(string mobile) |
|
|
|
{ |
|
|
|
return Regex.IsMatch(mobile, @"^(\+\d{2,3}\-)?\d{11}$"); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
} |
|
|
|
} |