I will better explain my situation with an example.
Considering a httpd.conf file in which I need to change the document root. So first I need to find the ServerName then change the document root, so I believe here I need two regexp but I m not sure how to do it?Can someone please help?Or do I just need to find the ServerName and make a note of the line number then proceed with finding the DocumentRoot using a script? Thanks.