How to read and parse this file values into a var?
I have a file in below format with diff server names and server alias'es,I saved it as .txt.I need to cycle through all the virtualHost tags and get server name and do the http request there and verify it is redirected correctly and also it matches the response code.
I need to parse out "ServerName","ServerAlias",Response code 404
RedirectMatch 404 ^/(catlocal.*)
RedirectMatch 404 ^/(project.*)
RedirectMatch 404 ^/(local.*)
RedirectMatch 404 ^/(catlist.*)
DirectoryIndex index.jsp index.html
Re: How to read and parse this file values into a var?
Easiest solution would be to convert your file into a CSV, putting the server name, alias and response code into separate columns.
Else, you might need to host your txt file to a server and parse it with the xpath extractor