I have a below word list:
www.home.example.com
www.example.com
home.example.com
google.com
example.com
child.example.com
sameer.example.com
sameer.google.com
I need a regex which only matches child domains of example.com
, meaning I need the below answer:
www.home.example.com
home.example.com
child.example.com
sameer.example.com
But without using egrep -v
option.
I have tried egrep -i '(([(a-zA-Z0-9\-\.|^www)]*)\.example\.com)'
but did not work. Any help will be highly appreciated.