Get 10 characters before substring in logstash?

Thanks @R-Ali

But what i want is different i want first 10 characters from a substring in ERRORTYPE field where the substring ends with Exception .

EX: "ERRORTYPE" : "The exception name is INDEXNOTFOUNDException"

Then i need to get "ErrorType" : INDEXNOTFOUNDException

Ref: How do perform string manipulations

Thanks