I would like to know if there is any command line tool to search text files preloaded with some well-known regexes (IP, email, date, path, url, xml tags, etc) so you could do something like:grep -A 5 '443: open' somefile.log | getregexmatch --ipTo extract all the IP addresses from the output of grep. 
Is there any text search tool preloaded with well-known regexes?
regular expression;utilities
Yes, perl is your friend. In this case perl's Regexp::Common in particular. It provides predefined regex definitions (see the documentation for more details : http://search.cpan.org/~abigail/Regexp-Common-2016020301/lib/Regexp/Common.pm).An IPv4 example would be :$ perl -MRegexp::Common -lne 'print $1 if /($RE{net}{IPv4})/g' file172.18.0.1172.17.0.1127.0.0.1