I have a Docuemnt No in following sequence
Typically a DocuemntNumber wil be Type1-01-001-123
But there is bad data also so some of them may be just 01-003-234 ( No type) or 01/004/123 ( with /) ..e.t.c
I need the oracle query for following
Check if the pattern of docuemnt number is correct ( That is 3 hiphens) .
If the pattern is correct , return the Docuemnt type (First part of the DocuemntNo)
Else return ''