다음을 통해 공유


SPUtility.IsValidStringInput Method

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.String

    The regular expression specifying the valid format.

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.

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace