Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

REG EXPRESSION

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken - 29 Aug 2007 19:55 GMT
How can I insert into validationExpression for "any word within 50 any
character long"?
Alexey Smirnov - 29 Aug 2007 20:59 GMT
> How can I insert into validationExpression for "any word within 50 any
> character long"?

.{50}

more info here: http://msdn2.microsoft.com/en-us/library/ae5bf541(VS.80).aspx
Alexey Smirnov - 29 Aug 2007 21:01 GMT
> > How can I insert into validationExpression for "any word within 50 any
> > character long"?
>
> .{50}
>
> more info here:http://msdn2.microsoft.com/en-us/library/ae5bf541(VS.80).aspx

if space is not allowed then use

\w{50}

it would match any word character including underscore [A-Za-z0-9_]
Ken - 29 Aug 2007 21:24 GMT
Strange enough, it wasn't working .
It seems working with "\w{0,50}" now.

Thanks.

>> > How can I insert into validationExpression for "any word within 50 any
>> > character long"?
[quoted text clipped - 9 lines]
>
> it would match any word character including underscore [A-Za-z0-9_]
Alexey Smirnov - 29 Aug 2007 21:34 GMT
> Strange enough, it wasn't working .
> It seems working with "\w{0,50}" now.

if you need to validate a text in the TextBox control then you can
simply use the maxlength property
Ken - 29 Aug 2007 21:35 GMT
well,
I used RegularExpressionValidator within EditItemTemplate in  the formview.
when I tried to update without changing the value for the
"ControlToValidate" for that RegularExpressionValidator, it shows the
errorMessage even though this is valid.

> Strange enough, it wasn't working .
> It seems working with "\w{0,50}" now.
[quoted text clipped - 14 lines]
>>
>> it would match any word character including underscore [A-Za-z0-9_]
Alexey Smirnov - 29 Aug 2007 23:14 GMT
> well,
> I used RegularExpressionValidator within EditItemTemplate in  the formview.
[quoted text clipped - 4 lines]
> > Strange enough, it wasn't working .
> > It seems working with "\w{0,50}" now.

Do you mean that "\w{0,50}" is not working, or what?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.