txt 2 re
        headache relief for programmers :: regular expression generator         (perl php python java javascript coldfusion c c++ ruby vb vbscript j# c# c++.net vb.net)
 
Enter the string that you want to use a regular expression on:
1
   
 
Select the elements that you want to extract to run regular expression generator:
2
w
c w
ww
w
c w
ww
w
c w
ww
varwww
wordwww
.
c .
t
c t
wt
o
c o
wo
m
c m
wm
e
c e
we
x
c x
wx
tomex
wordtomex
-
c -
m
c m
wm
e
c e
we
b
c b
wb
l
c l
wl
e
c e
we
varmeble
wordmeble
.
c .
p
c p
wp
l
c l
wl
varpl
wordpl
fqdnwww.tomex-meble.pl
< Source String
What to click?  extract any integer in this position
extract this integer (2006) in this position
 
3C++.net regular expression program that extracts the selected elements from the entered string:
Perl PHP Python Java Javascript ColdFusion C C++ Ruby VB VBScript J#.net C#.net [C++.net] VB.net 
 
// URL that generated this code:
// http://www.txt2re.com/index-c++dotnet.php3?s=www.tomex-meble.pl&-5

#include "stdafx.h"
using namespace System;
using namespace System::Text::RegularExpressions;

int main()
{
  String^ txt="www.tomex-meble.pl";

  String^ re1=".*?";	// Non-greedy match on filler
  String^ re2="(tomex)";	// Variable Name 1

  Regex^ r = gcnew Regex(re1+re2,RegexOptions::IgnoreCase|RegexOptions::Singleline);
  Match^ m = r->Match(txt);
  if (m->Success)
  {
      String^ var1=m->Groups[1]->Captures[0]->ToString();
      Console::Write("("+var1->ToString()+")"+"\n");
  }
  Console::ReadLine();
}

//-----
// Paste the code into a new Console Application
//-----
plain text version of code
 
 
 
 
Feedback
Lonely girl:: I love you.Thu, 5 Aug 2010 10:46AM
:: i dot understand this lolzThu, 5 Aug 2010 12:12PM
anonx174:: You should receive an award for this website. Seriously.Mon, 9 Aug 2010 11:22PM
cuono:: I present to you the ultimate award for helping mankind. It is guilded in gold or platinum and exists somewhere near Betelgeuse. Thanks for the great tool!Wed, 11 Aug 2010 09:12PM
Lonely boy:: I love you too Lonely girlThu, 12 Aug 2010 08:19AM
coder:: you lols - stuped toolThu, 12 Aug 2010 12:17PM
fan boy:: OMG OMG OMG OMG OMGFri, 13 Aug 2010 02:55AM
Alex:: thank you so much! i agree on the "ultimate award for helping mankind".Sat, 14 Aug 2010 02:28AM
outime:: Best tool in the world. Would be f****** awesome if you make it open-source to have it stored locally (offline)Sat, 14 Aug 2010 04:06AM
paul:: this site is the best site on earth!!!!!!!!!!!!!!!!!!!!!!!!!!Sat, 14 Aug 2010 08:53AM
ClusterOne:: wow, very helpful ... awsome!Sat, 14 Aug 2010 07:30PM
jkFF:: badly need this thanks!!! great job!!!Mon, 16 Aug 2010 07:08AM
ericlee:: amazingMon, 16 Aug 2010 08:05AM
Chris:: Awesome, thanks!Tue, 17 Aug 2010 03:55PM
Hendra:: Subhanallah, amazing.... Great job...!!!Tue, 17 Aug 2010 05:06PM
pdh:: amazing, saved me a bunch of time on tedious matchesWed, 18 Aug 2010 06:34PM
RubyFan:: Love thisThu, 19 Aug 2010 03:35PM
12 years old:: I'm 12 and what is this?Thu, 19 Aug 2010 08:45PM
Props:: thank you guys for keeping the headache out of my brain !Fri, 20 Aug 2010 02:08PM
mark:: yup really a wonderfull tool!Mon, 23 Aug 2010 01:00PM
py:: very thx for your website it's very helpfulTue, 24 Aug 2010 05:24PM
wrathtaker:: wahaw!!!!!Wed, 25 Aug 2010 07:10PM
bradyboy:: just amazingThu, 26 Aug 2010 03:47PM
george n.:: Thats amazing man, very very usefulThu, 26 Aug 2010 07:33PM
Zorro:: You saved me. You deserve a bawlz energy drink.Thu, 26 Aug 2010 11:14PM
kamm:: Thanks for sharing this with the world :)Fri, 27 Aug 2010 12:01PM
Kavinsky:: The best tool i found this year!Fri, 27 Aug 2010 06:10PM
yo yo:: life-saver, innt'it?Sun, 29 Aug 2010 06:09PM
:: You should definitly make an offline version of this, Great stuff!!Tue, 31 Aug 2010 01:22PM
:: Thanks so much, if there would be a donate Button, I would donate!Tue, 31 Aug 2010 06:21PM
mrithu:: nice !if php preg_match used it will be more helpfulWed, 1 Sep 2010 01:50PM
Wander:: Great one!Thu, 2 Sep 2010 08:16AM
FF:: One of the most useful regex tools I have seen to date.Thu, 2 Sep 2010 08:22PM
Alex:: complete godsend, thank you! lol win.Fri, 3 Sep 2010 11:55AM
Thanks!:: >_< to easySun, 5 Sep 2010 06:26AM
yiran:: very useful tool, thanksMon, 6 Sep 2010 07:34AM
deepak:: great toolTue, 7 Sep 2010 08:32AM
Shabcool:: awesum man great stuffTue, 7 Sep 2010 02:46PM
Bio:: Also wrote already how superb this site is! But I thought about a new future to check the regex life! Meaning changing some chars an see if it still fits.Tue, 7 Sep 2010 04:26PM
::  Wed, 8 Sep 2010 08:06AM
nwuvtafcvni:: MiAcythUBsRkstJWgxxWed, 8 Sep 2010 11:25AM
youAreTheBestInTheWorld:: Really................. i love you! Would you like to go out somewere with me?Wed, 8 Sep 2010 11:28AM
::  Thu, 9 Sep 2010 03:16AM
fox:: great application!Thu, 9 Sep 2010 09:23AM
 
  home     faq