一个获取本机ip地址的正则

ifconfig|grep -oP '(?<=inet addr:)(?=(?!127.0.0.1))d+(.d+){3}'

原文地址:https://www.cnblogs.com/vanwoos/p/9319130.html