Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

ExtractLinks

 

Loading links from page, inspired by http://isocpp.org/blog/2014/12/myths-3 6.1

 

 

ExtractLinks.cpp

 

#include <Core/Core.h>

#include <plugin/pcre/Pcre.h>

 

using namespace Upp;

 

// http://isocpp.org/blog/2014/12/myths-3 6.1

 

CONSOLE_APP_MAIN

{

    String s = ToCharset(CHARSET_UTF8, HttpRequest("http://www.stroustrup.com/C++.html").Execute(),

                         CHARSET_ISO8859_1);

    RegExp x("href *= *\"(.*?)\"");

    while(x.GlobalMatch(s))

        Cout() << x.GetStrings()[0] << "\n";

}

 

 

 

 

Do you want to contribute?