[Mono-bugs] [Bug 78007][Wis] New - ArgumentOutOfRangeException in Regex.Replace-Method

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Apr 4 03:13:32 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by chholz at web.de.


--- shadow/78007	2006-04-04 03:13:32.000000000 -0400
+++ shadow/78007.tmp.6548	2006-04-04 03:13:32.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 78007
+Product: Mono: Runtime
+Version: 1.1
+OS: other
+OS Details: Ubuntu Linux 5.04 Kernel 2.6.10-5-386
+Status: NEW   
+Severity: Unknown
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: chholz at web.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: ArgumentOutOfRangeException in Regex.Replace-Method
+here is the test.cs file.
+i'm using mono 1.1.13.
+compile with mcs test.cs
+run with mono test.exe
+------ cut here ------
+using System;
+using System.Text.RegularExpressions;
+class test
+        static void Main(string[] args)
+        {
+                string test = "head&gt;<html>hastdunichtgestekejflkasjdf
+lkajdflakjdf lakdjf lakdj sdflj ";
+                test = Regex.Replace(test, @"\Ahead&gt;\<html\>", "<html>");
+                Console.WriteLine(test);
+        }
+------ cut here ------
+output from mono --debug test.exe:
+------ cut here ------
+Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
+in [0x00091] (at
+System.Text.StringBuilder:Append (System.String value, Int32 startIndex,
+Int32 count)
+in [0x00046] (at
+System.Text.RegularExpressions.Regex:Replace (System.String input,
+System.Text.RegularExpressions.MatchAppendEvaluator evaluator, Int32 count,
+Int32 startat)
+in [0x00019] (at
+System.Text.RegularExpressions.Regex:Replace (System.String input,
+System.String replacement, Int32 count, Int32 startat)
+in [0x0001f] (at
+System.Text.RegularExpressions.Regex:Replace (System.String input,
+System.String replacement)
+in [0x0000b] (at
+System.Text.RegularExpressions.Regex:Replace (System.String input,
+System.String pattern, System.String replacement, RegexOptions options)
+in [0x00004] (at
+System.Text.RegularExpressions.Regex:Replace (System.String input,
+System.String pattern, System.String replacement)
+in <0x0001a> test:Main (System.String[] args)
+------ cut here ------

More information about the mono-bugs mailing list