[Mono-devel-list] Problem with regular expressions.

K SathyaSudha ksathyasudha at novell.com
Tue Nov 9 05:12:14 EST 2004


Hi,

Regular expressions do not seem to work correctly. This sample program
doesnt give the correct o/p:
.
.
.
class sample {
        public static void Main(String [] args) {
             Regex re = new Regex("\\b(?<num1>\\d+)");
             string intStr = "1000";
             Match m = re.Match(intStr);
             Console.WriteLine(m.Result("${num1}"));
        }
}

sudha at blr-mono-sachin:~/ado.net> mcs sample.cs
Compilation succeeded
sudha at blr-mono-sachin:~/ado.net> mono sample.exe
3612311011710949125

However, it worked fine with yesterday's (8th Nov) build. Is there
anything I'm missing here ?

Thanks,
Sudha.





More information about the Mono-devel-list mailing list