Bug 10670 fix.
[mono.git] / mcs / class / System / System.Text.RegularExpressions / PatternData.jvm.cs
index 0135818e4ed8a547fd61bec25239aaefdba5113a..519c925701edd01f88bc58c1328d249dccde2287 100644 (file)
@@ -112,7 +112,8 @@ namespace System.Text.RegularExpressions
                }
 
                private int GetJavaFlags (RegexOptions options) {
-                       int flags = 0;
+                       int flags = Pattern.UNIX_LINES; // .NET treats only the "\n" character as newline, UNIX_LINES implies the same behavior in Java.
+
                        if ((options & RegexOptions.IgnoreCase) == RegexOptions.IgnoreCase) {
                                flags |= Pattern.CASE_INSENSITIVE;
                        }
@@ -130,4 +131,4 @@ namespace System.Text.RegularExpressions
 
                #endregion Private methods
        }
-}
\ No newline at end of file
+}