SQL the last row of same data or substring string from text

I have a database similar to the following

-----------------------------
PRODUCT| TYPE | OWNER | DETAILS
-----------------------------
PEN    | X23  | JHON  | SERIAL 144358 NEW PEN WITH CODE PX-12  more text
PEN    | X23  | JHON  | SERIAL 123124 NEW PEN WITH CODE PX-12  more text
PEN    | X23  | JHON  | USED PEN WITH CODE PX-12 ... more text
-----------------------------

What I want to do is get the PX-12 code by either sub string that from the details column or just get the very last entry record that have a matching PRODUCT, TYPE, OWNER.

How do I achieve that?