Deserializeing a Regex on .net 4.0 works fine but throws an exception on Mono (tested on 2.6.7 Linux and 2.10.11 MacOSX)
```
$ mono -V
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using Newtonsoft.Json;
csharp> using System.Text.RegularExpressions;
csharp> JsonConvert.DeserializeObject<Regex>(JsonConvert.SerializeObject(new Regex("abc")));
System.InvalidCastException: Cannot cast from source type to destination type.
at Newtonsoft.Json.Serialization.JsonFormatterConverter.GetTokenValue<string> (object) <0x00048>
at Newtonsoft.Json.Serialization.JsonFormatterConverter.ToString (object) <0x00023>
at System.Runtime.Serialization.SerializationInfo.GetString (string) <0x0004b>
at System.Text.RegularExpressions.Regex..ctor (System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) <0x00027>
at (wrapper dynamic-method) System.Text.RegularExpressions.Regex.Void .ctor(SerializationInfo, StreamingContext) (object,object[]) <0x000c0>
at Newtonsoft.Json.Serialization.DefaultContractResolver/<>c__DisplayClass7.<CreateISerializableContract>b__6 (object[]) <0x00023>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializable (Newtonsoft.Json.JsonReader,Newtonsoft.Json.Serialization.JsonISerializableContract,string) <0x003a2>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x0036f>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x000c3>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader,System.Type,bool) <0x001cb>
csharp> System.Reflection.Assembly.GetAssembly(typeof(JsonConvert));
Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
```
However, setting a `[JsonConverter(typeof(Newtonsoft.Json.Converters.RegexConverter))]` on a Regex attribute makes deserialization works fine.
```
$ mono -V
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
$ csharp
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using Newtonsoft.Json;
csharp> using System.Text.RegularExpressions;
csharp> JsonConvert.DeserializeObject<Regex>(JsonConvert.SerializeObject(new Regex("abc")));
System.InvalidCastException: Cannot cast from source type to destination type.
at Newtonsoft.Json.Serialization.JsonFormatterConverter.GetTokenValue<string> (object) <0x00048>
at Newtonsoft.Json.Serialization.JsonFormatterConverter.ToString (object) <0x00023>
at System.Runtime.Serialization.SerializationInfo.GetString (string) <0x0004b>
at System.Text.RegularExpressions.Regex..ctor (System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext) <0x00027>
at (wrapper dynamic-method) System.Text.RegularExpressions.Regex.Void .ctor(SerializationInfo, StreamingContext) (object,object[]) <0x000c0>
at Newtonsoft.Json.Serialization.DefaultContractResolver/<>c__DisplayClass7.<CreateISerializableContract>b__6 (object[]) <0x00023>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateISerializable (Newtonsoft.Json.JsonReader,Newtonsoft.Json.Serialization.JsonISerializableContract,string) <0x003a2>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x0036f>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader,System.Type,Newtonsoft.Json.Serialization.JsonContract,Newtonsoft.Json.Serialization.JsonProperty,Newtonsoft.Json.Serialization.JsonContainerContract,Newtonsoft.Json.Serialization.JsonProperty,object) <0x000c3>
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader,System.Type,bool) <0x001cb>
csharp> System.Reflection.Assembly.GetAssembly(typeof(JsonConvert));
Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
```
However, setting a `[JsonConverter(typeof(Newtonsoft.Json.Converters.RegexConverter))]` on a Regex attribute makes deserialization works fine.