Because the only other online tool I could find for testing .NET
regular expressions was slow and covered with ads, I decided to
write a simple AJAX regular expression tester. It's certainly not
fancy, but it works for me.

jhunter, there are already several Windows Forms tools for testing regular expressions. See http://sharptoolbox.com/categories/regular-expressions

Thursday, September 27, 2007 8:48:46 PM by bkhvihvbijhb

I don't think you can call something "better" without supplying some sort of test results. What is yours better than?

Thursday, October 04, 2007 5:15:39 PM by Aleksey Malishkin

This is the greatest thing in the world! THANKS!!!!

Friday, January 25, 2008 2:06:56 PM by Hue Holleran

Really useful, Derek - the best around. Could I request one addition, please: could you add the group name to the output please? ie. pattern:@"--\s*\[\s*TABLE\s*\(\s*(?<table>.*?)\s*\)\s*\]", text:"-- [ TaBle ( bob ) ]" - I'd like to see the captured group name - would you consider doing this, please?

Wednesday, February 06, 2008 1:04:00 PM by Poor Richard

Works great. Just would like to see the results without having to scrool down (at least on my screen).

Thanks. -- Richard

Wednesday, February 06, 2008 1:08:39 PM by Poor Richard

Oops! My mistake. You just need to scroll down once and it all stays on screen.

Great! -- Rik

PS: Nice if you either underline the matches or made them bold or red.

Thursday, February 21, 2008 9:35:43 PM by LeeK

Just perfect Derek - it's bookmarked for me now. Thanks 1,000,000.

Monday, March 24, 2008 11:49:51 PM by Anonymous

Hi, great regexp tester, thanks! I was trying to figure out why my matches weren't working, then I realized I was cutting and pasting text from Notepad into the Pattern section which includes a newline. Since my input didn't include a newline, the match failed.

multiline and singleline are mutually exclusive. they have nothing to do with how many lines are in the target. multiline off set the eol and bol anchors to match eof and bof. singleline on lets . match all characters including /n

I was testing with the regex class in .net 2.0 using c# and my regex and source would not give me a match. This tool does give me a match. Any Ideas?Great tool though, i must add.

Tuesday, July 22, 2008 3:24:27 PM by Walter

Thanks for this one. Saved my day!

Sunday, August 03, 2008 5:18:48 PM by Alexander BH

Thanks for this great tool. I use it all the time! I just wanted to let you know!

Friday, August 15, 2008 10:33:48 AM by Emm

This helped me a lot! Much appreciated!

Saturday, August 16, 2008 7:53:54 AM by James

Super handy! Thanks very much!

Wednesday, September 17, 2008 10:03:33 PM by Robert S.

Well done!

Wednesday, November 12, 2008 11:53:20 AM by nyk_is_syk

helped me when mattered. tx god bless u all.

Tuesday, December 30, 2008 4:29:43 PM by Mike

Thank You

Wednesday, December 31, 2008 10:29:57 PM by Daniel

This is a great tool, and I really appreciate your taking the time to put it together. I noticed that there seems to be a problem displaying captured groups. Try this pattern:

^((?<entry>[^|]*)\|)*$

with this string:

This is one part.|This is another part.|

This expression correctly captures both parts (I checked), but it displays the two groups as "This is another part.|" and "This is another part." when the captures are actually "This is one part." and "This is another part."

Thanks again. This is an incredibly helpful tool!

Monday, January 12, 2009 5:41:27 PM by Marcelo

Very useful!

Friday, January 16, 2009 12:45:08 AM by jeff

Thank you! I use this a lot.

Friday, January 16, 2009 1:12:08 PM by Marco

Very useful :)

Tuesday, January 20, 2009 8:58:01 PM by Matt

@Daniel ^careful with your captures. The normal parenthesis are also captures even though they are not named.

Monday, February 02, 2009 5:43:39 PM by Alan

Very useful, thanks.

Monday, February 02, 2009 6:43:56 PM by John

Good job; thanks. Have you considered implementing non-greedy options? Or am I mistaken?

I love this app. Much nicer than the other online apps I used. Thank you much.

Thursday, February 05, 2009 9:39:14 AM by Sireesh Jindal

Hey, Is there any limitation in .Net regex on the input string?I have a 438 line input string, which I have to test against a Regex. But, in VS2005, everything seems to hang when I try to match the string with the Regex.

Wednesday, February 11, 2009 3:35:48 PM by ADovervik

If Visual Studio appears to hang for more than a second or two, you probably want to debug the regexp.

I have tested (in VS2005) to run a fairly complex pattern with 36 capturing groups, and 358 non-capturing used for manging sections of the Regex, against a 300 000 lines text file. A couple of seconds delay, but no hang.

Thursday, February 12, 2009 5:07:01 PM by LarryK

This rocks ... thanks!!

Tuesday, February 24, 2009 3:52:34 PM by Feng

It is wonderful, save time, save life! Thanks a lot!

Wednesday, February 25, 2009 8:02:05 PM by Jared Saindon

FINALLY someone took the time to make a decent online regex tester. Your contribution to the programming world is much appreciated. You are the man!

I found (the hard way) that if multiple capturing groups are included, only the Groups are displayed in the output. The captures contained within the groups are not shown.

Monday, September 07, 2009 3:45:24 PM by Stuart Duncan

You might want to remove post number 54! lol

Great tool, btw

Friday, September 11, 2009 2:54:38 AM by s0beit

Cool, can you add C++ output style as well?

Thursday, October 01, 2009 4:14:02 PM by Rusty

Nice...best I've found on the web. Very helpful!

Friday, October 09, 2009 5:33:41 PM by Gary

Found a bug. HTML truncates a series of spaces to one space. Thus the result is displayed incorrectly when spaces are grouped. Consider non-breaking spaces or the 'pre' tag.

Monday, October 26, 2009 3:40:37 PM by Brian

I especially like how this tool provides all the character escaping for you. I'm generally too lazy to do any such thing myself and really can save some headaches for any super complex expressions... Thanks!

Wednesday, November 11, 2009 6:56:33 PM by Gary

Space bug still exists. Type "123", ten spaces, "ABC" in the Source text box. Then type reg exp "3\x20{10}A" in the Pattern text box. The result only shows one space rather than the 10 spaces. This is because of the HTML feature of truncating spaces to a single space.

Great tool, have it bookmarked, use it all the time I'm creating regexes. Thanks!

Thursday, March 03, 2011 12:10:42 AM by Mike B.

Thanks! Works splendidly.

Friday, March 11, 2011 2:29:28 AM by Shiroy

Fantastic!! This is a simple and awesome tool!

Friday, March 11, 2011 4:12:48 AM by Chaitanya

Currently as on March 11 2011, The RegEx Tester seems to be not working. It would be great idea to make an utility, Since the tool is wonderful and deserve survival and existance.Will be happy if available at the earliest (atleast the link http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx revives it will be great)

Tuesday, March 15, 2011 6:18:50 PM by Shawn

Thank you SOOOOO much for making this available. Every time I needed something like this I had to write a small test app because I'd lose the last one I wrote.

Wednesday, March 30, 2011 8:01:39 PM by Dzyann

I was having problems with a regex, and after looking all over the place, I found this place and finally could make it work! Thanks!

Friday, April 29, 2011 2:30:33 PM by Rajeve

Derek Thanks, good app - what's with the Russian comments??

Tuesday, May 03, 2011 11:35:22 AM by Fredrik

Genious!

Monday, May 09, 2011 11:14:34 AM by Ajeesh

Thanks, nice work.

I am facing problem with the following regular expression. I was trying to find out repeating pattern in the input string.

Input String : 1234123412341234Pattern : ^(.*?)\1+

It is working on http://rubular.com/, but some how it is not working with .NET regex. Could u pls help me to figure out the exact problem?

Great job. Your creation will be useful for many generation to come. Cheers!

Friday, February 10, 2012 7:51:49 PM by Ruben

Thank you very much for you site. How many sites are still heavily used after such a long time.

Friday, February 24, 2012 8:40:43 PM by Doug

I come to this page at least once a month for the past 3 years... have to say it's a pretty great tool.

Thursday, March 01, 2012 5:03:31 PM by Barton

I've been looking for one of these for ages. Really nice work!

Friday, March 09, 2012 12:42:25 PM by matthias

2 years and 6 days ago, i already posted here and i again want to tell you, that this expression tester is awesome :)true, i use it in a completely different context now, but still the best out there :)

Wednesday, March 14, 2012 3:54:56 PM by misha amashukeli

Very good tool, helped me several times. Thank you!

Friday, March 23, 2012 6:38:19 PM by Corporate Serf

2012 and still a tool I use regularly.

You should put a Donate button on the page ;)!

Thursday, April 05, 2012 8:13:00 AM by Bart

I love this tool. Tnx!

Wednesday, May 02, 2012 4:13:20 AM by D Gorti

Thank you!!!!!

Wednesday, May 02, 2012 11:49:01 AM by Shim Shim

This is wonderful! Thank you!!

Thursday, May 03, 2012 2:44:39 PM by Andrew Day

Hey guys I hope you can help I am trying to build an regx that will validate all email address except for one specific domain an I want to use this in the c# regx validation control

any ideas?

Tuesday, May 08, 2012 11:03:51 AM by Jack

Very useful tool. Thanks a lot!

Thursday, May 10, 2012 4:03:01 AM by auraham

thanks, very useful

Saturday, May 12, 2012 10:33:35 AM by arvi

really great tool.

Wednesday, May 23, 2012 6:34:55 PM by Cory

I can't tell you how many times I've used this tool. Thanks.

Saturday, June 02, 2012 7:35:34 AM by Keen

Thank you for taking the time to do this and for making it freely available to others.

Also wanted to say thanks. This page is almost all I need when working with .NET regexes.

Wednesday, August 20, 2014 3:08:21 PM by mrkasr

great tool , i love it.

Thursday, September 04, 2014 8:15:06 AM by hebbja

Simple live saver. Thank you

Friday, September 12, 2014 8:08:40 AM by Volodymyr Knayzkov

It is great tool. Thank you for your work

Wednesday, September 24, 2014 9:04:56 AM by schleeke

nice one - helped me a lot while validating my patterns, thanks! :)

Wednesday, September 24, 2014 7:40:49 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Wednesday, September 24, 2014 7:43:00 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Wednesday, September 24, 2014 8:02:46 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Wednesday, September 24, 2014 8:23:27 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Wednesday, September 24, 2014 8:56:11 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Thursday, September 25, 2014 3:36:21 AM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Thursday, September 25, 2014 4:11:39 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Monday, September 29, 2014 4:27:55 PM by Mauricio Bustamante

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

Hi, great tool. I've been using it for a long time but now I need to do something that I don't want to using c#. Is it possible to get the number of times a word is repeated in a sentence: e.g. Sentence: "abc abc abc" Regex: ((?i)\babc\b). I want to get 3 instead of using .Count or Linq?

"must say that overall I am really impressed with this blog. It is easy to see that you are passionate about your writing. If only I had your writing ability I look forward to more updates and will be returning."Game Poker Online