I'm on an Oracle 12c database;
I have a column of data with values resembling this: HL7_Result_for_Message_ID_123Q324343.hl7
I need to grab that ID number (in bold), the challenge being that it can be any and all lengths. I have IDs that are as short as 1234, and some 25 characters, alphanumeric.
I tried a combo of rtrims and ltrims, which almost worked until i realized they don't actually match on strings, which misses some of the rows.
From what I've been able to gather, using REGEXP_SUBSTR could be a way to go, but I just don't know Regular expressions well enough to do anything useful.
Any thoughts?
Thanks
I have a column of data with values resembling this: HL7_Result_for_Message_ID_123Q324343.hl7
I need to grab that ID number (in bold), the challenge being that it can be any and all lengths. I have IDs that are as short as 1234, and some 25 characters, alphanumeric.
I tried a combo of rtrims and ltrims, which almost worked until i realized they don't actually match on strings, which misses some of the rows.
From what I've been able to gather, using REGEXP_SUBSTR could be a way to go, but I just don't know Regular expressions well enough to do anything useful.
Any thoughts?
Thanks