[Mono-list] Problem with Regex

Chris J. Breisch cjbreisch@altavista.net
Sat, 18 May 2002 06:03:40 -0500


You know...I knew that once.  Had forgotten.  Thanks.

		-chris

Chris J. Breisch, MCSD, MCDBA



-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Dan Lewis
Sent: Saturday, May 18, 2002 3:51 AM
To: mono-list@ximian.com
Subject: Re: [Mono-list] Problem with Regex

On Sat, 2002-05-18 at 05:58, Chris J. Breisch wrote:
> Is there something wrong with this?  Our Regex seems to hate it.
> 
> Regex NumberReg;
> 
> NumberReg = new Regex ("^[+-]?\\d*\\.?\\d*(e?[+-]?\\d*)");


By the way to save yourself going completely mad when writing regexes,
C#
designers had the foresight to include an uninterpolated string literal
syntax:

  NumberReg = new Regex( @"^[+-]?\d*\.?\d*(e?[+-]?\d*" );

This means that all escapes get passed directly to the regex parser.
Also
useful when writing DOS-style paths.

Dan.


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

_______________________________________________
Mono-list maillist  -  Mono-list@ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list