Hi,
I am not very good at regular expressions and am looking for a way to parse out the hostname from a HTML header string. My input string looks like this:
"Host: localhost:7799"
What makes this difficult for me is that the host string might contain an IP address, a hostname containing periods, and might not even contain a port number at all. Also, I am not sure if the space between Host: and localhost will always be there. Does anyone have some tips on how I might go about parsing this out? Thanks for taking the time to read this. Have a nice day,
Joe
20041002 Edit by castaway: Changed title from 'Reg eX'