Home All Groups Group Topic Archive Search About
Author
22 Nov 2005 8:10 PM
Murali
hi everybody,

i need a help from someone who knows regular expression.
i need a Regular expression for accepting atleast 1 digit and atmost 3 digits

i have tried with [0-9]{3} and \d{1,3} but both the expression is returning
true for IsValid Property of Regular Expression even if values are typed in
characters say..  abc or w12 etc.

with regards,
Murali

--
Murali
VSM Software (P) Ltd.
Bangalore,India

Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net-web-controls/200511/1

Author
30 Jan 2006 8:49 AM
Shem
Try

[\d_a-zA-Z]{1,3}


Show quoteHide quote
"Murali" wrote:

> hi everybody,
>
> i need a help from someone who knows regular expression.
> i need a Regular expression for accepting atleast 1 digit and atmost 3 digits
>
> i have tried with [0-9]{3} and \d{1,3} but both the expression is returning
> true for IsValid Property of Regular Expression even if values are typed in
> characters say..  abc or w12 etc.
>
> with regards,
> Murali
>
> --
> Murali
> VSM Software (P) Ltd.
> Bangalore,India
>
> Message posted via DotNetMonster.com
> http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net-web-controls/200511/1
>