[++] serialization helper. RegExp::toJSON