[Mono-list] RE: Problem with Regex

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


Actually, I should rephrase that.  My NUnit Test .build file doesn't do
that.  Should it?  I don't see the others doing that.

		-chris

Chris J. Breisch, MCSD, MCDBA



-----Original Message-----
From: Chris J. Breisch [mailto:cjbreisch@altavista.net] 
Sent: Saturday, May 18, 2002 5:59 AM
To: 'Lawrence Pit'; 'mono-list@ximian.com'
Subject: RE: [Mono-list] RE: Problem with Regex

Because NUnit doesn't do that, and this actually is part of an NUnit
test.

			-chris

Chris J. Breisch, MCSD, MCDBA



-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com] On
Behalf Of Lawrence Pit
Sent: Saturday, May 18, 2002 3:04 AM
To: Chris J. Breisch; mono-list@ximian.com
Subject: Re: [Mono-list] RE: Problem with Regex

Hi Chris,

Your regex's work fine in mono.

Why don't simply compile as:
    
    csc test.cs

or:

    mcs test.cs

and then run:

    mono ./test.exe

?


Greets,
Lawrence

----- Original Message ----- 
From: "Chris J. Breisch" <cjbreisch@altavista.net>
To: <mono-list@ximian.com>
Sent: Saturday, May 18, 2002 08:20
Subject: [Mono-list] RE: Problem with Regex


> Hmmmm.actually, I can't seem to get ANY Regex to work using our
> System.dll
> 
>  
> 
> Test file (and I know that it doesn't actually DO anything):
> 
>  
> 
> using System;
> 
> using System.Text.RegularExpressions;
> 
>  
> 
> class test {
> 
>             static int Main(string [] args) {
> 
>                         double d = Val("1.0");
> 
>                         
> 
>                         return 0;
> 
>             }
> 
>  
> 
>             public static double Val (string InputStr) {
> 
>                         Regex NumberReg;
> 
>  
> 
>                         NumberReg = new Regex (".*");
> 
>  
> 
>                         return 0;
> 
>             }
> 
> }
> 
>  
> 
> Compiled as:
> 
>  
> 
> csc /noconfig /lib:e:/cygwin/usr/local/lib
> /r:e:/cygwin/usr/local/lib/System.dll test.cs
> 
> Microsoft (R) Visual C# .NET Compiler version 7.00.9466
> 
> for Microsoft (R) .NET Framework version 1.0.3705
> 
> Copyright (C) Microsoft Corporation 2001. All rights reserved.
> 
>  
> 
> Ildasm verifies that it's using the mono version of System.dll
> 
>  
> 
> When I run my executable, I get a System.IO.FileNotFoundException:
> 
>  
> 
> Unhandled Exception: System.IO.FileNotFoundException: File or assembly
> name System, or one of its dependencies, was not found.
> 
> File name: "System"
> 
>    at test.Val(String InputStr)
> 
>    at test.Main(String[] args)
> 
>  
> 
> Fusion log follows: 
> 
> === Pre-bind state information ===
> 
> LOG: DisplayName = System, Version=0.0.0.0, Culture=neutral,
> PublicKeyToken=null
> 
>  (Fully-specified)
> 
> LOG: Appbase = E:\cygwin\home\cjbreisch\
> 
> LOG: Initial PrivatePath = NULL
> 
> Calling assembly : test, Version=0.0.0.0, Culture=neutral,
> PublicKeyToken=null.
> 
> ===
> 
>  
> 
> LOG: Policy not being applied to reference at this time (private,
> custom, partial, or location-based assembly bind).
> 
> LOG: Post-policy reference: System, Version=0.0.0.0, Culture=neutral,
> PublicKeyToken=null
> 
> LOG: Attempting download of new URL
> file:///E:/cygwin/home/cjbreisch/System.DLL.
> 
> LOG: Attempting download of new URL
> file:///E:/cygwin/home/cjbreisch/System/System.DLL.
> 
> LOG: Attempting download of new URL
> file:///E:/cygwin/home/cjbreisch/System.EXE.
> 
> LOG: Attempting download of new URL
> file:///E:/cygwin/home/cjbreisch/System/System.EXE
> <file:///E:\cygwin\home\cjbreisch\System\System.EXE> .
> 
>  
> 
>                                                 -chris
> 
>  
> 
> Chris J. Breisch, MCSD, MCDBA
> 
>  
> 
>  
> 
> -----Original Message-----
> From: Chris J. Breisch [mailto:cjbreisch@altavista.net] 
> Sent: Friday, May 17, 2002 11:58 PM
> To: 'mono-list@ximian.com'
> Subject: Problem with Regex
> 
>  
> 
> Putting aside for the moment whether or not you'd ever really want to
do
> such a thing.
> 
>  
> 
> Is there something wrong with this?  Our Regex seems to hate it.
> 
>  
> 
> Regex NumberReg;
> 
> NumberReg = new Regex ("^[+-]?\\d*\\.?\\d*(e?[+-]?\\d*)");
> 
>  
> 
>                                     -chris
> 
>  
> 
> Chris J. Breisch, MCSD, MCDBA
> 
>  
> 
>  
> 
> 



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