DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 17:13:11 +0200,    posted on: microsoft.public.dotnet.languages.csharp        back       

Thread Index
  1    Tobias Schröer
          2    Jon Skeet [C# MVP]


Matching a number   
Hi,

I'd like to validate a number input using a regular expression. This 
would be done by "\d*". Now the input may have a fdecimal separator, 
wich would be matched by "\d*(\.|,)\d*" (allowing the , as separator as 
well).

What I need know is to ensure, that the total length of the string does 
match a fixed length. Without the decimal separator this is trivial, but 
with decimal separator I am stuck, as I am not too deep into regular 
expression syntax.

TIA,
Tobi
Date:Thu, 23 Aug 2007 17:13:11 +0200   Author:  

Re: Matching a number   
On Aug 23, 4:13 pm, Tobias Schröer 
wrote:

> I'd like to validate a number input using a regular expression.


Does it *have* to be a regular expression? Are you doing this using
some component which requires a regular expression, or could you split
it into a regular expression and a length check?

Jon
Date:Thu, 23 Aug 2007 08:26:44 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us