I have a string like A12345678B
I want to be able to check if a string starts with a character, is followed by 8 digits and ends with a character.
We are trying:
SELECT REGEXP_INSTR('A12345678B', '[[:alpha:]]{1}[[:digit:]]{8}[[:alpha:]]{10}',1,1,1,'i') from DUAL
This returns :
11
We want to be able to determine that if a string does NOT start and end with a character and is not followed by 8 digits after the first character ( see sample string above ), THEN this is not the string that we are looking for .