Fix to RegexSerializer

Added writing an reading of the flags field