-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: Augustine
Message 1 in Discussion
Hi! In my web application, i'd to restrict the users from entering more than 100
words in textarea(textbox control with multiline, id being 'txt_desc'). I'd used
regular expression for the same, the code being
Dim isOk As Boolean = True
If Regex.IsMatch(Me.txt_desc.Text, "^\s*(\w+\s*){0,100}$") = False Then
isOk = False
End If
Everything goes fine, when 100/less words are used.
But even when 101 words are used, the page is getting processed very very slow. The
CPU usage of server shoots up to 100%.
Please enlighten me, as to where it went wrong. Is there any way to optimise the regex
pattern?
Thanx
Augustine
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]