Add custom serializer for Regex

This addresses issue #46. I also included the intellij idea plugin. Let me know if that's an issue and I'll take it out!