确定指定的文本是否为指定的正则表达式的格式无效。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function IsValidStringInput ( _
regexp As String, _
newValue As String _
) As Boolean
用法
Dim regexp As String
Dim newValue As String
Dim returnValue As Boolean
returnValue = SPUtility.IsValidStringInput(regexp, _
newValue)
public static bool IsValidStringInput(
string regexp,
string newValue
)
参数
regexp
类型:System.String指定有效的格式的正则表达式。
newValue
类型:System.String要验证的文本。
返回值
类型:System.Boolean
返回true文本是否以指定格式 ;否则为false。
备注
此方法确定newValue参数的值是否与regexp参数中的正则表达式相匹配。