mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.examples
git-svn-id: svn://ultimatepp.org/upp/trunk@8029 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1a8bfb88e8
commit
b393e9041b
3 changed files with 30 additions and 0 deletions
13
examples/ExtractLinks/ExtractLinks.cpp
Normal file
13
examples/ExtractLinks/ExtractLinks.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <Core/Core.h>
|
||||
#include <plugin/pcre/Pcre.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
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";
|
||||
}
|
||||
12
examples/ExtractLinks/ExtractLinks.upp
Normal file
12
examples/ExtractLinks/ExtractLinks.upp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
description "Loading links from page, inspired by http://isocpp.org/blog/2014/12/myths-3 6.1\377";
|
||||
|
||||
uses
|
||||
Core,
|
||||
plugin/pcre;
|
||||
|
||||
file
|
||||
ExtractLinks.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
5
examples/ExtractLinks/init
Normal file
5
examples/ExtractLinks/init
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _ExtractLinks_icpp_init_stub
|
||||
#define _ExtractLinks_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#include "plugin/pcre/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue