My regular expression is hanging for 5 extra seconds per character for each character that is added to the string, when the string exceeds 30 characters in length.
The regular expression checks for correct email addresses.
the following example has 33 chars and hangs for about 20 seconds. Try adding more chars and see what happens.
here is the code:-
Dim regEx As RegExp
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "^([a-z0-9_\-\.]+)*[a-z0-9]@[a-z][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$"
regEx.Test("veryverylongemailaddress@work.com")
Why ?
The regular expression checks for correct email addresses.
the following example has 33 chars and hangs for about 20 seconds. Try adding more chars and see what happens.
here is the code:-
Dim regEx As RegExp
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "^([a-z0-9_\-\.]+)*[a-z0-9]@[a-z][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$"
regEx.Test("veryverylongemailaddress@work.com")
Why ?