[Mono-list] Problem with Regex
Sat, 18 May 2002 09:51:29 +0100 (BST)
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.
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts