Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Determines whether the specified text is in a valid format as specified by a regular expression.
Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function IsValidStringInput ( _
    regexp As String, _
    newValue As String _
) As Boolean
'Usage
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
)
Parameters
regexp
Type: System.StringThe regular expression specifying the valid format.
newValue
Type: System.StringThe text to validate.
Return Value
Type: System.Boolean
Returns true if the text is in the specified format; otherwise, false.
Remarks
This method determines whether the value of the newValue parameter matches the regular expression in the regexp parameter.