#include <Core/Core.h>
#include <plugin/pcre/Pcre.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
String s;
RegExp r0("((\\w+)\\s(\\w+)\\s(\\w+))");
if(r0.GlobalMatch("one two three one two three one two three"))
{
DUMP(r0.GetCount());
for(int i = 0; i < r0.GetCount(); i++)
s << r0[i] << '\n';
s << "---\n";
} else if(r0.IsError())
s << r0.GetError() << '\n';
s << "------------------------------\n";
RegExp r1("(\\w+)", RegExp::UNICODE);
int i = 0;
while(r1.GlobalMatch("hello 4 ho 55 uuu iii pp 99 baby too swistak"))
{
for(int i = 0; i < r1.GetCount(); i++)
s << r1[i] << '\n';
}
if(r1.IsError())
Cout() << r1.GetError() << '\n';
DUMP(s);
Cout() << s ;
}