How to get the first two octets in an IP address Oracle SQL
I know you have an accepted answer but just for completeness here's an option without REGEX;

SELECT SUBSTR(your_field,1,INSTR(your_field,'.',1,2)-1)
FROM dual