I'm not sure what exactly you want but patterns (text beween two words or pattern) can be selected using sed:
Code:
sed -n '/WORD1/,/WORD2/p' httpd.conf
sed -n '/<VirtualHost*/,/<\/VirtualHost>/p' httpd.conf
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat