// URL that generated this code:
// http://txt2re.com/index-c++dotnet.php3?s=42%2043&2&8&6
#include "stdafx.h"
using namespace System;
using namespace System::Text::RegularExpressions;
int main()
{
String^ txt="42 43";
String^ re1="(\\d)"; // Any Single Digit 1
String^ re2="(\\d)"; // Any Single Digit 2
String^ re3=".*?"; // Non-greedy match on filler
String^ re4="(\\d+)"; // Integer Number 1
Regex^ r = gcnew Regex(re1+re2+re3+re4,RegexOptions::IgnoreCase|RegexOptions::Singleline);
Match^ m = r->Match(txt);
if (m->Success)
{
String^ d1=m->Groups[1]->Captures[0]->ToString();
String^ d2=m->Groups[2]->Captures[0]->ToString();
String^ int1=m->Groups[3]->Captures[0]->ToString();
Console::Write("("+d1->ToString()+")"+"("+d2->ToString()+")"+"("+int1->ToString()+")"+"\n");
}
Console::ReadLine();
}
//-----
// Paste the code into a new Console Application
//-----
 
Feedback
::
thks
Wed, 29 May 2013 01:24AM
::
mmamt suchucazz attacat nanz u can randag i nonnt
Wed, 29 May 2013 10:53AM
zk::
great work! super useful, thanks so much!!
Wed, 29 May 2013 05:52PM
KisnardOnline::
perfect perfect perfect... get some ads on this site, so we can thank you more
Wed, 29 May 2013 10:21PM
ShubhamGupta::
Saved my day!
Wed, 29 May 2013 11:36PM
::
Thu, 30 May 2013 12:02AM
Astarte::
Awesome, just awesome!
Thu, 30 May 2013 12:03AM
David Dawkins::
Excellent tool, where's the donate link? thank-you !!!