alternative for egrep -o on HP-UX

Hello to all board members!!

I have a problem on a HP-UX system. I should write a script. Therefore I need to search after IP addresses in the output of a command.

On Debian this works:

 ifconfig | egrep -o "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"

The script where i need this is not ifconfig, but the output has a lot of rubbish and some IP addresses. And I need the IP addresses.

Another problem is that there is no way to find the IP on another way.

Is there someting avaiable on HP-Ux to search something like xxx.xxx.xxx.xxx ?

I also don't want to install the GNU egrep.

Try:

... | perl -lne'print $1 while /((?:\d+\.){3}\d+)/g

absolutely brilliant!!
Thank you very much. :b:
I searched 2 days for something like this.