Regular expression on centralaccount

Hi All,

I have a Formatting script on the central account which checks below regular expression.

^[0-9a-zA-Z][0-9a-zA-Z\.-]{1,63}$

When I try to add a person from the web it returns the error. This was working fine in 7.0 but it is failing in 8.1

My function is as below.

Function CCC_CheckStringByPattern( pattern As String, text As String) As String
Dim regEx As Regex
Dim Match As Match

regEx = New Regex(pattern)
Match = regEx.Match(Trim(text))
If Not Match.Success Then
Throw New ViException(#LD("Failed only allowed : {0}",pattern)#)
End If

Return Trim(text)
End Function

I think when I created a person's initially central account is blank and this is the reason it is failing.

Do you have any idea how can I allow blank in this regular expression.

Thank you.

Kind Reagds,

Dnyandev

Parents Reply Children
No Data