#include <regex>
#include <iostream>

int main()
{
        std::string uri = "http://e...content-available-to-author-only...e.com/test.html";
        std::regex reg("^(.+):\\/\\/(.+@)?([a-zA-Z\\.0-9\\-]+)(:\\d{1,5})?([^?\\n\\#]*)(\\?[^#\\n]*)?(\\#.*)?$");
        std::smatch match;
        std::regex_match(uri, match, reg);
        for(auto& e: match)
        {
                std::cout<<e.str() <<std::endl;
        }
}
