gSkinner - Home

RegExr: Free Online RegEx Testing Tool

Posted on March 26, 2008 by Grant Skinner

RegExr is an online tool for editing and testing Regular Expressions (RegExp / RegEx). It provides a simple interface to enter RegEx expressions, and visualize matches in real-time editable source text. It also provides a handy RegExp snippet sidebar with descriptions and usage examples to make it easier to learn Regular Expressions through trial and error.

It isn’t as powerful as a product like RegExBuddy, but it has the advantage of being online and free. I will be releasing a free desktop version for Mac OSX and Windows built with AIR in the next day or two.

So far this has only taken a day of development, and the main app is only 150 lines of code. Flex 3 makes this kind of app so darn simple to put together.

RegExr is built with Flex 3, and uses ActionScript 3’s built in RegExp engine. As with most engines, the AS3 RegExp implementation isn’t perfect, so you are likely to encounter some limitations and oddities. Likewise, RegExr is very much beta software (did I mention it was developed in a day?), and currently has no error handling whatsoever, so it’ll probably have a few quirks of its own.

RegExr uses an extension of the TextHilighter class that comes with the Spelling Plus Library. We will be including the RegExpHighlighter class with a future release of SPL.


If you encounter any issues using RegExr, would like to request a feature, or have a snippet you’d like to see added to the snippets pane, leave a comment below.

Here’s a quick screen shot of RegExr in action.

The latest version of RegExr will always have a permanent home at: gskinner.com/RegExr/. Flash Player 9 is required. I hope this is useful to people!

Update Mar 27, 08:

0.1.2b is online. Please click here to read about the update.

Update Mar 31, 08:

0.1.4b is online, and the desktop version of RegExr is now available. Please click here to read about the desktop version.

Update Mar 31, 08 (2):

0.1.5b is online, with support for replace functionality.

Update Apr 1, 08:

0.2.0b is online. I wrote a simple RegEx lexer for this version, so it understands your expressions at the token level. It still has a couple of minor quirks (character ranges with escaped characters is the main known issue [\x41-\x48] ).

Update Apr 2, 08:

0.2.1b is online. It addresses issues with character ranges and escaped characters, and includes some minor UI tweaks. Click here for more info.

Update May 26, 09:

0.3b is online. It allows you to save, share, search, and rate patterns. Click here for more info.

Follow @gskinner on Twitter for more news and views on interactive media.
245 Comments

Very useful tool! Thanks.

Posted by: Kyle on Mar 26, 2008 2:08pm URL: http://flexmonkeypatches.com

I made a similar application a while ago, you can see it at http://blog.idsklijnsma.nl/regular-expression-tester-v10/

It has code highlighting and you can test with replace functions.

Posted by: Ids on Mar 26, 2008 2:18pm URL: http://www.idsklijnsma.nl

Useful, thanks!

Posted by: Nate Chatellier on Mar 26, 2008 2:20pm URL: http://blog.natejc.com

Grant, this is very cool. Super useful, and I like the didactic aspects of the UI.

One thing that would be useful would be to have an 'auto-execute' mode/checkbox so that you could see the matches change on every keystroke in the TextInput.

Posted by: Daniel Wabyick on Mar 26, 2008 3:40pm URL: http://www.wabysabi.com

Ids - nice work! I started writing a lexer, but didn't finish it in the one day limit I gave myself (I'm currently procrastinating about doing my FitC slides). I hope to add similar functionality soon.

Daniel - definitely in my plans. I just need to handle exceptions properly first. I don't want the browser to crash because of a malformed expression.

Posted by: Grant Skinner on Mar 26, 2008 4:01pm URL: http://gskinner.com/blog/

I have been using this, pretty cool:-

http://osteele.com/tools/rework/

Posted by: Abdul Qabiz on Mar 26, 2008 11:05pm URL: http://www.abdulqabiz.com/blog/

Hello Grant. Just wanted to inform you that your regex tool came in very handy when I most needed it. Thanks for your effort.

Posted by: William from Lagos on Apr 2, 2008 4:52am

Doubleclicking text in the pattern field seems a bit off. Can't put a finger on exactly what, tho :)

It would be nice to have some sort of hierarchical doubleclick action. I.e. first select a group, then a component of the group and last the set or quantifier of the selected component.

Posted by: Magnus on Apr 3, 2008 2:14am

Great tool, there's nothing worse than trying to do ReGex without a scratch pad to work out whether they work okay or not - that's just what this is. I downloaded the Adobe AIR version and will use it regularly, I guarantee.

Posted by: Mark Benson on Apr 10, 2008 1:37am URL: http://markbenson.org/blog

Hello, nice tool. It will be nice to see it on Russian. Can I help you to translate?

Posted by: TermiT on Apr 10, 2008 11:17am URL: http://blog.termit.name/

In the desktop version it would be nice to be able to save your expressions, perhaps along with the examples to the right.

Posted by: tan on Apr 14, 2008 11:19am

Thanks for the great job you have done. That is one "kick-ass" tool. Thanks again.

Posted by: kerem on Apr 14, 2008 11:24am

Hi this is great, RegEx expressions can get way confusing, but your app sure makes things easier. If I may ask for your advice though via an example-

If I wish to strip bracket characters such as * () [] "" etc from a string using one RegEx pattern, what would the RegExp look like? I can successfully replace one at a time with your tool, using \* but if I add something like \*\( it doesn't replace anything.

Thanks, really great AIR app as well.

Posted by: JP Venter on May 3, 2008 2:43pm

Sorry it is me again, with regards to my last post about the mutliple replace in one RegExp, I have the solution which you may like to work into your next release.

To replace * and () in one expression use:

/(\*|\(|\))/gi. Perhaps when a further expression is added via your app you could somehow insert the | and enclosing brackets to make the replace work.

Thanks, JP.

Posted by: JP Venter on May 3, 2008 3:20pm

Hello Grant,

Excellent initiative! I'm looking forward to using it!

I've tested sofar:

Expresso Regular Expression Development Tool

by Ultrapico. It is pretty advanced (too much ?) and might be inspiring for your own tool?

Posted by: Cedric M. (aka maddec) on May 8, 2008 10:41am URL: http://analogdesign.ch

Hi Grant,

Thanks for putting this out there! After a couple years of false starts, it's really helped me finally figure out regular expressions. I would like to second tan's suggestion to add the ability to save patterns to the sidebar in the AIR version.

Posted by: Daniel Williams on May 16, 2008 12:29pm URL: http://www.themathiseasy.com

Air version needs unrestricted access to computer ???

Why?

Posted by: xavi on May 20, 2008 3:39am

There is no option to copy the matched result.

Thanks

Posted by: Florin on Jun 3, 2008 4:17am

Very handy tool, but it showing the text as like whole pattern matching, while explanation showing right things.

Try this RE:

\b((?:http|ftp)://[^\s\"\']\S+?)(?:[\,\.\|\)\>\'\"]?(?:\s|$))

And any text that contains URL's. It should match URL right after it's end, before any dots, pipes, quotes etc.

Explanation is right:

RegExp: /\b((?:http|ftp)://[^\s\"\']\S+?)(?:[\,\.\|\)\>\'\"]?(?:\s|$))/gi

pattern: \b((?:http|ftp)://[^\s\"\']\S+?)(?:[\,\.\|\)\>\'\"]?(?:\s|$))

flags: gi

1 capturing groups:

group 1: ((?:http|ftp)://[^\s\"\']\S+?)

But I just spotted a minor error.

In

RegExp: /\b((?:http|ftp)://[^\s\"\']\S+?)(?:[\,\.\|\)\>\'\"]?(?:\s|$))/gi

It should either select alternative chars to mark start-stop (i.e. # or !), or escape "//" in middle.

Posted by: AnrDaemon on Jun 4, 2008 10:04am

AnrDaemon,

I'm not sure I understand the issue. There is a possible problem with your expression, in that it matches characters at the end it probably shouldn't. Notice below I have changed the trailing non-capture group to a forwards look around instead.

\b((?:http|ftp)://[^\s\"\']\S+?)(?=[\,\.\|\)\>\'\"]?(?:\s|$))

You did make me notice a problem with my RegExp Lexer where it doesn't deal with escaped closing brackets properly. I'll try to fix that.

Posted by: Grant Skinner on Jun 5, 2008 9:07am URL: http://gskinner.com/blog/

Very cool tool. It would be great if it is able to generate code like php, perl and C#. Check out this online tool (http://www.techeden.com/regex). It can generate php code. This feature is really useful.

Posted by: Adam on Jul 16, 2008 11:47pm

I found a small bug:

If you enter a positive lookbehind (?

Posted by: grapefrukt on Jul 18, 2008 7:31am URL: http://grapefrukt.com/blog/

hi. great tool to play around with :)

but i'm running in some problems/questions here: i'm trying to get the text between two html-tag - without the tags!

<a href='asdasd'>text</a>

should return "text"

i'm not so much into regex - the one i'm trying is:

(?<=<a.*?>)(.*?)(?=</a>)

or

/(?<=<a.*?>)(.*?)(?=</a>)/gi

hope this'll show up correctly in the browser ..!?

maybe someone can help me ... what am i doing wrong. or is the positive lookbehind not working properly?

thanks, phil

Posted by: philipp on Aug 18, 2008 7:20am URL: http://www.beta-interactive.de

Phil - have you tried using the snippet to do this from the samples list (in the right side bar)? It's the second one from the bottom in that list. You may have to tweak it for your specific needs, but it handles the example you posted nicely.

Posted by: Grant Skinner on Aug 18, 2008 10:31am URL: http://gskinner.com/blog/

thanks grant ... didn't see that one ;)

will try to change the snippet to my needs.

Posted by: Philipp on Aug 19, 2008 3:46am URL: http://www.beta-interactive.de

Thank you a lot Mister Skinner!

The only thing it lacks is the ability to show the text and regExp that were in the fields at the moment when I close the app.

I hope there will be such a feature in the next version (if there's going to be one) :)

Posted by: agnostik on Sep 1, 2008 1:43pm URL: http://agnostik.com.ua/

Great app! Thank you Mister Skinner.

It only misses one thing - the ability to remember the content of the fields which were just before I close the app. It's a bit annoying to paste the text and regExp each time you start a work with it.

Posted by: agnostik on Sep 2, 2008 3:04am URL: http://agnostik.com.ua

This is an amazing tool! Thank you a lot Mister Skinner.

The only thing it lacks is the ability to "remember" all the texts there were in the fields just before the app is closed.

Posted by: agnostik on Sep 4, 2008 3:23pm

Unrestricted for AIR version?

No thanks.

Posted by: Fred on Sep 11, 2008 11:47am

Fred,

This is a standard message on the AIR application installer. It merely indicates (in a rather dramatic way) that it will have the same access to your system that any other desktop application has. Adobe just feels the need to warn you about it, whereas other desktop application installers do not.

Cheer, Grant.

Posted by: Grant Skinner on Sep 11, 2008 11:49am URL: http://gskinner.com/blog/

i was writing yet another regex at work today utilising this app which reminded me what a great user experience it provides integrating the logic development, syntax checking, and case testing into a single clean interface! very "regexbuddy" lite ... if only there were a version for e4x ;)

Posted by: Jon Toland on Sep 16, 2008 12:42am

I've been using RegExr for a while and just have to say Thanks! It is awesome.

- Rory

Posted by: Rory on Sep 24, 2008 3:28am

Great tool Grant - thanks

Posted by: David on Sep 30, 2008 4:10am

Hi Grant,

I've been a fan of your work for quite some time now.

Earlier this year, I was doing lot of regular expression work and upon searching the web, I didn't find any good tools (this was before you posted regexr). In February I began building an application to rapidly create Flex regular expressions in a similar style to the 'Explorer' applications that exist for Styles and Components.

I had it 95% complete by May, but had to put it on the back burner. Later in the summer, a friend of mine sent me a link to your application which I have found to be a quality tool, as I certainly expect from you. But it has some different feature sets to the tool I was building, so I recently was able to wrap mine up and posted it yesterday.

It is called the Flex 3 Regular Expression Explorer and can be found at my blog:

http://blog.ryanswanson.com/2008/10/introducing-flex-3-regular-expression.html

I felt that providing an interpretive environment for rapidly creating regular expression was a great base feature set, but I really wanted people who don't understand regular expressions to be able to get involved, so I added a full-featured contextual help panel. I also wanted to provide some basic examples that I came up with but also allow anyone else who uses the tool to be able to contribute their own creation as well to the community. When we all work together, we all profit, etc.

Anyhow, I just wanted to send you a quick note and mention what a fan I've been of your work and to see if you had any feedback for the application I just released.

Cheers,

Ryan

See you at MAX!

Posted by: Ryan Swanson on Oct 18, 2008 10:08pm URL: http://ryanswanson.com

grapefrukt, philipp - yes, there's a look behind behavior bug in EcmaScript 3 RegExp. This issue was committed to Adobe JIRA:

http://bugs.adobe.com/jira/browse/ASC-3399

and then has been marked as external and redirected to Mozilla's Bugzilla:

https://bugzilla.mozilla.org/show_bug.cgi?id=445815

This doesn't help us in solving the problem, but at least we know what's the root of the wrong behavior.

Posted by: Rostislav Siryk on Nov 10, 2008 12:38pm URL: http://en.flash-ripper.com/

What regexp dialect is this for? Ecmascript's?

Posted by: glbl on Nov 10, 2008 5:00pm

Regexr is a great tool, thanks for putting it together. Any change you could actually show the different groups captured? Thanks!

Posted by: Nick on Nov 21, 2008 12:59am

Nick - if you roll over a match highlight (the blur round rectangles), it will dispay a tooltip showing the captured groups. Is that what you needed?

Posted by: Grant Skinner on Nov 21, 2008 8:34am URL: http://gskinner.com/blog/

I just wanted to say thank you! this is an awesome tool and has helped me learn Regular Expressions.

Posted by: tanner on Dec 16, 2008 3:57pm URL: http://www.cabedge.com

regexr is great, but I noticed some inconsistencies when using the expressions in javascript on other browsers... so, I developed a similar tool that is native to javascript on the browser it is running... check it out (see my link)

www.cyber-reality.com/regexy.html

I hope this helps others too.

Posted by: chad on Dec 19, 2008 8:00am URL: http://www.cyber-reality.com/regexy.html

I don't know where to report the problem, so lets do it here...

The entry field to enter the regex takes the AltGr key into account as if it was a character key, so that when I type "AltGr+(" to get the character "[", the field will contain AltGr[ while AltGr stays invisible. I correct this by going one letter back and typing backspace.

This is, under Linux with the Linux Flash version 10.

Posted by: Mike on Jan 14, 2009 1:52pm

Thanks so much for this. This editor is invaluable.

Posted by: Holger on Jan 21, 2009 3:43am URL: http://hmatthies.com

Two bugreports and one request:

- lookbehind is displayed as lookahead (highlighting help textwhen hovering over the regex part)

- When matches are displayed, hovering over the match will show information about it. But it is impossible to click the match to position the cursor there.

+ Please allow oldschool keyboard shortcuts (CTRL+Ins = copy, Shift+Ins = paste, Shift+Del = cut).

Using Opera 9.5 on Vista.

Posted by: Holger on Jan 22, 2009 8:41am URL: http://hmatthies.com

I'm running a GNU/Linux x86_64 and I've got this error while trying to install the desktop version :

"This application requires a version of the Adobe Integrated Runtime (AIR) which is no longer supported. Please contact the application author for an updated version."

Plus, as posted above, I've got an additional character when using AltGr : "" (char code 0x03)

Posted by: Avétis KAZARIAN on Mar 5, 2009 12:35pm

For the "additional character" it seems to be a problem with encoding : I've got some "é" etc. when trying some latin characters.

Anyway, the tool works fine.

Great job.

Posted by: Avétis KAZARIAN on Mar 5, 2009 12:54pm

Find ich echt Super! Gute Arbeit.

Posted by: private on Mar 25, 2009 5:19am

Hey Grant. Great plugin, and especially great UI. I'd like to suggest one improvement: It would be great if your app also translated expressions into the proper regex syntax for various languages. I tried one of the other tools listed in these comments located at: http://osteele.com/tools/rework/ and I was able to solve a problem that had plagued me for hours because I (a designer not developer) had no idea I was using improper syntax. RegExr is such a great teaching tool, this seems like it would be a perfect addition.

Again, great app.

Posted by: raafi on Mar 30, 2009 2:51am URL: http://raafirivero.com/blog/

Hey Grant. Need a save faechure

and nice to see online loading and saving users regexp's

its easy to do and very helpful for endusers...

waiting for updates

Posted by: Flop on Apr 4, 2009 6:33am URL: http://bafpug.com

How about unicode support in this app?

Posted by: Melnaron on Apr 11, 2009 7:29am URL: http://melnaron.net

Excellent tool. After hours of trying to get my regular expression syntax correct and failing, I searched for a regex tool and found yours.

It is great!

Posted by: Andrew on Apr 30, 2009 7:13am URL: http://www.youtubekeep.com

Awesome! And all the other goodies mentioned in the comments too - a RE Bonanza! Would be excellent if I could save my expressions to the APP. Would be super if input box supported Undo.

Thank You!

Posted by: john on May 9, 2009 7:05pm URL: http://www.webdeveloperss.com/

Hiya again.

I already wrote to thank you for this cool tool. A request, if you ever revisit it: an option for a considerably larger font size. On my Mac, the text is VERY small for my aging eyes, and I guess, since it's Flash, I can't change the text size as I do for regular web pages. Thanks!

Edly

Posted by: Edly on May 11, 2009 6:21am URL: http://edly.com

Super! I'm using the web-application for a while now. Maybe a nice icon would make the lot a bit more nicer, no? ;)

Posted by: donotfold on May 27, 2009 6:06am URL: http://www.donotfold.be

Hey Grant, very nice and usefull app, but could you please implement and auto-update version and maybe a small nice icon, a little bit easier to recognize on a Mac in a folder.

Just a tip!

Posted by: Joey on May 27, 2009 6:37am URL: http://www.joeyvandijk.nl

Is anyone having trouble with the results portion of the app not displaying the regex result?

Posted by: lgordon on May 28, 2009 1:09pm

I'm having problems too with the last update.

It used to display multiple matches before but it doesn't work now .... not even with things like [0-9]*.

Is it possible to get the previous version?

Posted by: Juan Hernandez on May 29, 2009 8:27am

Igordon & Juan,

If you're able to reproduce these issues, please let me know and we'll try to fix them. I can't reproduce them here. Starting up RegExr online or desktop, and typing in [0-9] shows 3 results on the default text (0,3,3).

Posted by: Grant Skinner on May 29, 2009 2:23pm URL: http://gskinner.com/blog/

Hi Grant,

I'm not sure but I think the matches used to work slightly different (I don't have the previous version so I cannot confirm it 100%).

When putting an expression with the default text like (\w*) (to match all the words) only the first word is matched. I think like it was before it would have matched every word in the text.

Posted by: Juan Hernandez on Jun 2, 2009 10:19am

Juan,

You'll notice that \w* turns red, this is because it can match 0 characters, and get stuck in an infinite loop. If you change your search to \w+, which requires at least one character to match, you should see the result you are expecting.

Posted by: Grant Skinner on Jun 2, 2009 10:29am URL: http://gskinner.com/blog/

This is an awesome tool. Two things that may make a small improvement: the ability to be able to zoom in (make the text bigger), and the ability for sharing (in other words, having a URL that will auto-init the page with the data that I would like to share). Also, a dropdown to select the language in which the RegEx will be used (since not all languages support all of the RegEx capabilities).

Other than that, this is my tool of choice now.

Posted by: Dmitriy on Jun 2, 2009 1:44pm

On what software was the UI made?

Posted by: xzeth on Jun 7, 2009 11:47pm

Exactly what I needed. Thanks!

Posted by: Joe Kotvas on Jul 1, 2009 9:56pm

Really lovely thing. But I wanted a desktop version I failed to install on Intrepid Ibex and Jaunty Jackalope latest updated version of Ubuntu Linux. the RegExr.Air file doesn't download at all. Even if it downloads then Adobe AIR installer says its corrupted.

Posted by: Lenin on Jul 3, 2009 11:04am URL: http://twitter.com/nine_L

This is an amazing tool, really awesome! Just what I was looking for. Looking forward to any updates. Thank you very much!

Posted by: Cornelis Brouwers on Jul 23, 2009 12:28am URL: http://easyflipbook.com

Very useful tool. And when something won't work, it helps! XD

Last time I've used? Regular expressions in .htaccess file (for mod rewrite) :P

Posted by: BiGAlex on Jul 23, 2009 11:33pm URL: http://www.bigalex.it

Just found out about this via a Google search that found a cybernetnews.com entry about it.

Wanted to say thanks for an awesome tool. I may finally get the hang of regular expressions with this! :-)

Posted by: Bruno G. on Aug 4, 2009 12:28pm

Thank you very much for this!! Magnificent tool and AIR app.

Posted by: andre felipe on Aug 6, 2009 4:18pm URL: http://www.circulo.in

I figured out how to replace a matched string with the new string I specify. BUT how do I use the replace function to use the string that matched.

For instance:

(412) 567-7889, (412) 567-7882

Becomes

+1 (412) 567-7889, +1 (412) 567-7882

Or, and I cannot imagine why I would want to do it but

(412) 567-7889, (412) 567-7882

Becomes

Please call(412) 567-7889 to speak to the doctor, Please call (412) 567-7882 to speak to the doctor

Posted by: Farrel on Aug 12, 2009 3:42pm

Ok I saw how to use the matched string in the replacement: $&

Posted by: Farrel on Aug 12, 2009 4:23pm

Amazing tool! superb!

Posted by: Dutzi on Aug 28, 2009 7:48pm URL: http://www.bidding.co.il

Like "john" said 4 months ago, undo for the input box would be great. While working on an especially tricky expression, I think I managed to reach for the currently nonexistent feature at least 3 times in one minute :)

But apart from that, RegExr is great. :D

-dav7

Posted by: dav7 on Sep 3, 2009 11:49pm

Seems the standards for this have not been updated. I am looking for case-insensitive checking, to keep my expression as small but have the same utility as my others.

Current form:

(http\://)+([\w\d\.]+\.([\w]{2,6}))

New Standards form:

(?i)((http\://)+([\w\d\.]+\.([\w]{2,6})))

Posted by: John on Sep 13, 2009 1:53pm URL: http://woodassoc.us/blog/b2e/index.php/jw

Awesome tool. It helped me a lot when I decided to learn RegExp

Posted by: Ahmad Alfy on Sep 16, 2009 2:35am URL: http://www.alfystudio.com

so nice app man!!!

perfect! Are the any flash exe file that we dont need to install anything else and use offline??

Posted by: weber on Sep 16, 2009 12:43pm

Just wanted to say thanks for the great work. This is a life-saver.I work in a government org where our PCs are really locked down (unfortunately not for any glamorous reason--our IT dept is just really intrusive), so I can't install 3rd party apps like RegexBuddy. But they can't keep me from opening up my browser!

Posted by: svend on Oct 6, 2009 8:11am

WOW! That's awesome. Makes it so easy, no need to wonder anymore "where did I miss a dot?".

Thanks a million for this software :)

Cheers.

Posted by: PHP Coder on Oct 19, 2009 11:24am

Maravilhoso, acho que é a melhor formar para testar expressões regulares! Parabéns!

Posted by: Gustavo Krause on Oct 23, 2009 12:37pm URL: http://www.webstandards.blog.br/

Good job!!, It's a very usefull tool!!!

You could improve it by adding an option to save customs expresions into external files, so then you can load them in other PC, or something like that..

Thank you a lot!! Adrián (from Argentina)

Posted by: Adrian Gallardo on Nov 5, 2009 9:07am

Excellent tool

Posted by: Leon on Nov 11, 2009 10:33am

it is very usefull.

thanks a lot...

Posted by: Esad on Dec 1, 2009 11:42pm

HI everyone,

Need your help here

That tool is helpfull, but I cannot resolve my problem

This is my string :

NSD-IN.prv one two three ce test consiste a trouver des NSD occurences nsd de span a l'interieur des href. bla NSD-IN.prv

NOW I am trying to match all occurences of "NSD" but not within the tag

THis matches my exclusion : ]*>(.*?)

How can I use it with combinaison of (NSD)

THanks

Posted by: Mouhamed on Dec 11, 2009 9:49am

it is a very nice and comfortable tool. i liked it.

thanks alot.

;)

Posted by: asd on Dec 14, 2009 7:25am URL: http://asd.com

Thank you so much!!! very great and friendly tool to learn the unfriendly yet powerful regular expression!

Posted by: manuel3026@yahoo.com.hk on Dec 17, 2009 8:59pm

Great Tool! but how i'll find the Expression for the following :

1) 1/1

2) 1/1/1

3) 1/1/1/1

Consider 1 as decimal and it should satisfy all three conditions. Can anyone help me.

Posted by: Sumod on Dec 20, 2009 9:53pm

Hi

I found a bug.

The Regexp "(.)$1" in the textbox does not match "aa" in the textarea. Surely it should. This affects both the online version and the AIR one. I suspect that this was a bug introduced in an update as your second last Sample Regexp for "matching text that is not part of a HTML tag" also fails and I'm sure you tested it but may have overlooked during updates.

I hope you fix this - its a great teaching tool.

Thanks,

Pedro

Posted by: Pedro Sland on Jan 2, 2010 3:21pm

(?

Posted by: BUG REPORT on Jan 4, 2010 4:02pm

Thank you much for providing an online editor that provides RE functionality. This satisfies a much needed niche.

I found a bug: Character classes that need the closing square paren viz., the ']' character is not supported.

I have tried -

[]] as well as [\]]

- to no avail.

Posted by: Anand Hariharan on Jan 9, 2010 11:18pm

how to find the Expression for the following :

1) 1/1

2) 1/1/1

3) 1/1/1/1

Consider 1 as decimal and it should satisfy all three conditions. Can anyone help me.

Posted by: Sumod on Jan 17, 2010 9:05pm

Great Tool! I love it!

I found a slight bug: The lookbehind's are incorrectly labeled lookahead's when you hover over them in the regex input box.

Thank again!

Posted by: Jonathon Reinhart on Jan 27, 2010 4:00pm

Wonderful tool. I use the online version whenever I am doing Perl regexp programming to save time.

Thanks!

Posted by: Ge Zhang on Feb 4, 2010 7:17pm

First... I love this tool. I am adding it to my list of the "best free resources online".

Two... Where is the donate button?

Three... Give us the ability to comment on comments, or start a forum!

Four... Please change the blog sort-order so new posts are first.

Fifth... Would be great if we could save our "testing data" too... not just the formula. (Though, for others submissions, that would not immediately display, for reasons of spam. But it would be available so we can see how through the code is, and possibly submit "failures" or suggestions by linking to a custom "comments" page.)

Sixth... It would be SUPER if you could setup "COLOR MATCHING" to indicate which characters matched each appropriate condition as a selectable option. (Possibly even show the matching combo when we mouse-over that color in the found-text.)

EG... showing that /a[tpg]e/ matches ape by highlighting the 'a' blue in the code and text, the p yellow, the e green... or for the formula, the entire [tpg] might be yellow, showing you where, not the exact condition.

NOTE: Seems that the program has a hard time identifying "\/" as an escaped "/", though it pairs it correctly and has the definition in the box on the right-side. (Might be because you are escaping it as "\\\/" in the code, so it can't match correctly? or it is escaped as "\\/" since the real code in the program that identifies, may not need to escape the "/", just the "\".

Posted by: ISAWHIM on Feb 5, 2010 6:26am URL: http://www.isawhim.com

Grant, just downloaded the AIR version (because Safari and FP 10.1 don't like each other and I don't like FF that much).

Anyway, a tiny little feature request that bugs me nonetheless: Please save the window size in the AIR app. It drives me crazy ;-)

Love love love your very useful RegEx tool!! (and it made me finally appreciate RegEx)

Posted by: Severin Klaus on Feb 9, 2010 7:45am URL: http://blog.betabong.com

very useful tool, thank you :)

Posted by: Pawel on Feb 11, 2010 3:35am URL: http://xlkstyle.com

You have no support of:

a{,5} !!! only a{0,5}

you have no support of

(?:text)

(?>text)

(?=text)

(?!text)

(?

Posted by: Vic on Feb 18, 2010 2:45am

Hello.

BUG:

replace not working with $1 - returns $1 but not a first capture.

Posted by: gimcnuk on Mar 14, 2010 5:48am URL: http://www.ruslog.com/

gimcnuk - I just tested this, and it seems to work fine. Perhaps there was a problem with your expression? To test, launch RegExr, click the replace tab, and change the replace expression to use $1 instead of $&. You should see the correct results in the output.

Posted by: Grant Skinner on Mar 14, 2010 10:48am URL: http://gskinner.com/blog/

Hi,

This is a great tool, but is there a way to insert escaped characters in the replacement string. For example, is there a way to replace something with "\n$1\n"?

Thanks.

Posted by: Bob Bobson on Mar 15, 2010 7:37am URL: http://www.org/

Sorry, I forgot to add another example such as replacing something like "resume" with "resum\xE9".

Posted by: Bob Bobson on Mar 15, 2010 7:40am URL: http://www.org/

The desktop version of RegExr runs afoul of Norton Internet Security 2010's behavioral malware detection feature (called SONAR).

I've had the same problem with one other AIR app that I knew was harmless: Dwarf, a screen ruler program from Jonnie Hallman of destroytoday.com. Perhaps the two of you could work together to figure out what's causing the problem?

Posted by: Adam Messinger on Mar 18, 2010 10:18am URL: http://www.zenscope.com/

What a great tool! The user interface is especially smooth and intuitive, and the hover text that decodes each element of the regexp is really useful. It's a delight to use.

Posted by: Michael on Apr 7, 2010 5:59pm URL: http://inhumandecency.livejournal.com

I noticed that e.g. [a-z]+ highlights all matches as expected, but [a-z]* doesn't but it still replaces as expected.

Posted by: olivier on Apr 19, 2010 10:06am

This is an awesome tool I stumbled across after a Google search. Helped me alot with a project I'm working on. I especially like the 'as-you-type' feature.

Posted by: George Edison on Apr 22, 2010 9:32pm URL: http://quickmediasolutions.com

Absolutely fantastic, i want to have your babies.

Far easier to learn regex with this.

Posted by: Joshua on Apr 24, 2010 4:28pm

Great tool. Was useful today when I found out that my text editor didn't support greedy/lazy quantification.

Suggestion: Could you highlight the text inserted/deleted by the replace tool? Would make it more intuitive to see what exactly the replace command did.

Posted by: Jim Hsu on Apr 26, 2010 10:29pm URL: http://www.diyeconomist.net

After updating my AIR runtime the app does not run anymore. It says it´s running on aunsurported air version.

I´m using the latest air runtime

Posted by: Marc on May 3, 2010 12:45pm

Excellent tools ! Well done.

I have a suggestion for a good feature (well this is what I would need in fact ;) ):

Propose a different highlight color for each matched group. Indeed if you specify several groups in your expression, all the match is highlighted with only once color, and then you cannot easily see what part of the expression matches each group.

Thanks again.

Posted by: Jerome on May 17, 2010 3:34am

I don't have an execute button on my display...I'm not sure how to trigger the evaluation

Posted by: Michael Dean on May 28, 2010 2:41pm

I love this tool, it make me win many time!

Just one think and it will be perfect : make the patern field multiple lines when 'extended' option is On.

So instead of :

/^(1[-\s.])?(\()?\d{3}(?(2)\))[-\s.]?\d{3}[-\s.]?\d{4}$/

We can do :

/^

(1[-\s.])? # optional '1-', '1.' or '1'

( \( )? # optional opening parenthesis

\d{3} # the area code

(?(2) \) ) # if there was opening parenthesis, close it

[-\s.]? # followed by '-' or '.' or space

\d{3} # first 3 digits

[-\s.]? # followed by '-' or '.' or space

\d{4} # last 4 digits

$/x

Inspired from here :

http://net.tutsplus.com/tutorials/php/advanced-regular-expression-tips-and-techniques/#post-11011

Thanks again

Posted by: Fabio on Jun 1, 2010 3:39am

I don't have an Execute button on the online version. :(

http://gskinner.com/RegExr/

Posted by: Josh on Jun 4, 2010 10:40am

There is no execute button. It executes as you type. You'll see the match results highlighted in real time in the source text.

Posted by: Grant Skinner on Jun 4, 2010 10:49am URL: http://gskinner.com/blog/

Hi Grant, what do you think about my proposition (multiple line patern when 'x' option) ?

Posted by: Fabio on Jun 14, 2010 2:38am

You guys are absolutely pimp. I was needing to get drop down list values formatted into HTML and you guys saved my ass. This rocks better than any regex editor I've seen and its freaking free. You rock hard.

Posted by: Jason on Jun 26, 2010 7:28pm URL: http://www.sebringcreative.com

Hi Grant

That's a great tool. I am new to RegEx and this is make learning some much easier.

I was wondering if it is possible to replace specify different replacement of each captured group. For example replace group 1 by ""

Cheers

Sheils

Posted by: Sheils on Jul 16, 2010 9:36pm

its a very useful tool.

thank you

Posted by: SHAMS on Aug 6, 2010 3:36am URL: http://mohammadshams.blogspot.com/

Excellent! Time and money safer - big time!

Only one question: Where can we donate?

Posted by: Wolfgang on Aug 21, 2010 1:25pm URL: http://www.ixquisite.com

I think the negative look behind is not working properly. It isn't doing what I'd expect and when you mouse over it it says negative lookahead.

Posted by: Marc on Aug 25, 2010 10:12pm

Thanks for great tool. It's very usefull for me and fits better than other similar tools.

I'd like to suggest feature for next releases, if any.

It will be very nice to have ability to chain test several replace regular expressions in batch. I mean first expression applied to source text, second expression applied to result of first and so on.

Thanks again.

Posted by: e226329 on Sep 2, 2010 11:45pm

Thank you for very nice service!

Posted by: NoFog on Sep 14, 2010 12:13am

Hi Grant,

I'm using regex's like most of programmers now and than. But so far I did it more the try'n error way. Today, finding and using your tool (air app) all of an sudden it went klick in my head. You helped me A LOT man, getting the way regex and most of all replace works, into my head.

I appreciate your work

Thanks

Axel

Posted by: axel on Sep 29, 2010 3:50am URL: http://data.anito.de

Hi, just found this online regexp-tester. It's great.

But somehow I don't understand what your empty lines consist of?

In your sample text these regex'es doesn't return any matches:

^$

^.$

^[\r\n(\r\n)]$

If it's because the engine strips newlines, then why do I get a match with .\r and not with \r

With multiline selected I cannot find any newlines either:

\r

\n

\r\n

and this: ^.*\r$ only matches the 2 lines that have empty lines after them.

Is it an engine bug, or can you explain this behavior?

Posted by: Andreas Blinkenberg on Sep 29, 2010 7:21am

Andreas - This is actually a visualization issue. CRs & LFs do not have any boundary areas, so they are not highlighted. Thus, if your match only consists of these characters, you won't be able to see it.

For now, you could use a replace to see where the matches are occurring (ex. replace them all with * or something).

Perhaps I should add a short summary at the bottom indicating the number of matches, and/or figure out a way to visualize matched new line characters.

Posted by: Grant Skinner on Sep 29, 2010 7:36am URL: http://gskinner.com/blog/

Thanks for a fast answer.

And I can only say: but of course.

I don't know why it didn't cross my mind to try and replace them.

A visualization would definitely be a nice feature, also a feature that few others have implemented.

Maybe the user could choose to see these via a checkbox.

Maybe give them a color, so they stand out...

Other invisible characters could also be of interest, for instance:

utf-8 decimal 65279 - zero width no-break space

and maybe utf-8 decimal 1-31 although few of these are ever used.

Posted by: Andreas Blinkenberg on Sep 29, 2010 11:34am

What a fine project tool, Grant, thank you for sharing this with the community.

Couple Questions...

1 ==============

?-PORTABILITY (the online tool version): When you save to "My Saved" the entry(s) appear to be saved in the Flash Player Local Storage Cookie, is this correct?

**I was hoping to be able to access my online saved stuff on my portable USB stick ;^)

Can you recommend a method/procedure for doing so?

My concern would be that if I had changes to merge from one "regexr_patterns.sol" file to another (assuming that is the item to save/copy/?), since its binary how could one do that?

And/or, if I go to another machine where the user already has their own stored there, how could I bring mine up? Esp on a portable stick ;^)

And/or to merge from+to the Desktop App?

2 =========

SAVE EXAMPLE/RESULTS?... any plans to save the "example" section so when you load a saved item you can see the pertinent substitution that apply to that?

========

Thanks ;^)

Posted by: TwoHawks on Oct 7, 2010 6:09pm

Oh thank you so much, regexp always frustrates me, this tool is invaluable!

Posted by: pg on Oct 13, 2010 2:03pm URL: http://chrisgilligan.com/

The execute button is not showing for me at all.. on the Online version or desktop..

Posted by: Ricky Mindanao on Dec 13, 2010 1:39pm

Ricky - the newer versions do not have an execute button. They display results in real time.

Posted by: Grant Skinner on Dec 13, 2010 1:45pm

First, this is one of the best tools that I use on a regular basis, thanks a ton!

I ran into an oddity between the desktop version and the web one. Here's a screenshot of the two. Seems to be just a highlighting issue as replacing works as expected.

http://oi55.tinypic.com/4vkeo1.jpg

I think it has to do with newline characters since moving everything to one line fixes it. (on Mac)

Posted by: Greg on Dec 14, 2010 7:39am

Online version needs work. The 'replace' section doesn't always get updated. (Using FF 3.6.13)

Posted by: Ben S on Jan 19, 2011 12:17pm

The great project! Thanks a lot!!
But I found a bug. Hints are buggy on this regexp: \[([^\]]*)\]
When I moveover cursor on \] it can't recognize it, it thinks that pattern [^\]] is not-\ pattern primary. But it's not-] pattern.

Posted by: realsonic on Jan 27, 2011 7:22am

Big thanks for this tool. Except for some moments with text selection and cursor, it's a great thing, especially text in the beggining of work and community.

Posted by: Ramin on Feb 21, 2011 5:07am

Loving the browser app, clean, simple and easy to use. =)
Grabbing the desktop version for sure next time I'm on my Mac.
I'm sure it'll come in very handy in the up-hill struggle that trying to bend my brain around regex is proving to be. =P

Got a snippet I've knocked up which I wildly claim you should include: (providing it doesn't get shot down for inefficiency by a regex guru in 2 seconds flat ;))

/^(0|[1-9][0-9]*)[\.][0-9]*[1-9]$/

Matches floating point/decimal numbers, without allowing any trailing or leading 0s other than to express 0.x

(Tips on improving it, anyone?)

Posted by: Joey on Feb 21, 2011 3:08pm URL: http://www.anti-culture.net

i like regexr but i don't like adobe air so please create stand-alone desktop version

Posted by: ewwink on Feb 24, 2011 3:32pm

Very useful tool, thanks a lot. Bookmarked.

Posted by: Espu on Feb 25, 2011 9:45am

Thanks for the work on this tool - it's very useful and I've shared the link with my dev team. Cheers!

Posted by: Ciaran Archer on Mar 11, 2011 8:26am URL: http://flydillonfly.wordpress.com

Another tool but more basic than RegExr http://regexp.online-toolz.com/tools/regexp-editor.php

Posted by: patrik on Mar 15, 2011 1:49pm

Great app. Very useful for a starting programmer. Thanks! Would you accept a suggestion? There is one thing that would make this better for people like me who have sight problems: being able to increase the size of the characters. If you could implement this, I would be really grateful.

Posted by: Josep M. Fontana on Mar 18, 2011 10:59am

Hi, noticed one thing (dont know, if its a problem or not)

(match point, brackets, semicolon)
this regexp --> \|\\]|\\[|\\.|\,

in regexr its not working, but in as3-code, does
------------------------------------------------
from the other side
this regexp --> \|\]|\[|\.|\,

in regexr is working, but in as3-code, does not

Posted by: Rodislav Moldovan on Mar 23, 2011 4:21am URL: http://despre.md/ideapress

Great tool ! I love it ;-)

Posted by: bennelli on Apr 4, 2011 8:23am

Awesome, I was trying to do a find and replace in notepad++ using regex and this tool came in handy although for some reason, using regex for the replace function in notepad++ doesn't seem to work like it does here.

I'm trying to do a replace on the first character for each line in a single column of text using the RegExp: /^./gm (I'm simply typing "^." in my search without the quotes).

Awesome tool and great for someone like me who is new to the power of regex!

Posted by: Steve on Apr 5, 2011 8:06am

Hi Grant-

Thank you for RegExr; it makes a convoluted task so much simpler.

I found a rather strange behavior: When an expression has been added to the 'my saved' tab and then the menu item is either double-clicked or the 'load' link is clicked, it replaces the full expression that is being authored. However, when adding an expression from the 'samples' tab it appends it.

I understand that the first makes some sense, but would prefer that clicking a saved expression appended it.

Thanks again!

Posted by: Brett on Apr 14, 2011 10:35am URL: http://www.periscopic.com

I use it often and it's a fantastic source!
Thank u

Posted by: Sandro Berri on May 19, 2011 3:02am

so where is the desktop apps? i cant believe it is made in 2008, and im commenting it now 2011. It was 3 years ago.. hahaha

Posted by: cute programmer on May 20, 2011 10:41am URL: http://www.rahjv4.tk

I love every single aspect of this application except for one…

There is no Text Extraction tab or something akin to that. Where you could extract and output formatted results of reg expression search. Say if you wanted to extract all emails out of a file or phone numbers or something else. Rather than specifying how to take into account the rest of useless information and dividing everything in capture groups it could list all matches in separate field based on formatting that one could specify.

I might not be an expert but given that you tackled on-the-fly replace(which i really admire) it probably won't not be very hard to implement.

With this it will be the ULTIMATE editing tool.
Nevertheless Thank you for such a great application!

Posted by: Semferon on Jun 30, 2011 2:22pm

Simple feature request:

Would you please number the groups in the regular expression field? This makes it simpler for the user to identify the tool's group references such as:

^group [1234567890]+

Posted by: Jason Stich on Jul 7, 2011 4:03pm

Great tool!!!!
I think it could be even greater if you supported (?!test) so that one could quickly match everything that is not the group you are searching for. This would allow you to extract all the text you want real quick. Just match everything that is not what you are looking for, and replace that with nothing. Then your left with just the part you were interested in.

Posted by: Kurt Whittemore on Jul 14, 2011 10:22am

This is a fantastic little tool. I use it a lot and it's taken pretty much everything I've thrown at it. This is in fact the only regex tool I've come across that will handle PERL Compatible RegEx syntax correctly without having a nervous breakdown.
I use a lot of PC Regex named groups in the form of (?<name>.*) etc. I then reuse them using \k or (?(name)...). (Yes I've even used (?R) for recursion).

One minor niggle....

The capturing groups summary unfortunately won't show these properly at the bottom because they look like html tags in the browser version of RegExr. Also beyond a certain length the nesting highlight stops working on the regex string as well.

I'll try and put in the horribly complex 500 char regex I've been debugging with the help of your beautiful tool but I don't think this little wordpress post form would like the use of the <> chars in it and probably filter them.

/(?\/\*[\s\S]*?\*\/|\/\/.*?$)|\s*(?\<(?=\?))?(?(?(ck)\?|[\'\"]))?(?(?:\\\\|\\\k|(?(qk).|[^\s:{]))*?)(?(qk)\k(?(ck)\>))\s*(?:(?:)|(?\{)|;)\s*(?\<(?=\?))?(?(?(cv)\?|[\'\"]))?(?(?:\\\\|\\(?(br)[\{\}]|\k)|(?(br)[^\{\}\"\']|.)|(?(br)(?R)))*?)(?(qv)\k(?(cv)\>))(?(br)\}|(?(cl);))|(?[^\s]+)/sm

Can you guess what it is yet?

Posted by: Darron Smith on Jul 16, 2011 8:35pm URL: http://aardan.co.uk

Sorry I'll try that again...

/(?<comment>\/\*[\s\S]*?\*\/|\/\/.*?$)|\s*(?<ck>\<(?=\?))?(?<qk>(?(ck)\?|[\'\"]))?(?<key>(?:\\\\|\\\k<qk>|(?(qk).|[^\s:{]))*?)(?(qk)\k<qk>(?(ck)\>))\s*(?:(?<cl>:)|(?<br>\{)|;)\s*(?<cv>\<(?=\?))?(?<qv>(?(cv)\?|[\'\"]))?(?<val>(?:\\\\|\\(?(br)[\{\}]|\k<qv>)|(?(br)[^\{\}\"\']|.)|(?(br)(?R)))*?)(?(qv)\k<qv>(?(cv)\>))(?(br)\}|(?(cl);))|(?<error>[^\s]+)/sm

Posted by: Darron Smith on Jul 16, 2011 8:37pm URL: http://aardan.co.uk

I'm attempting to use a back reference within my regex, which should be valid. However it doesn't appear to be working with Regexr. I'm not sure if it's a bug within my regex or within regexr but I wanted to let you know about it so that you can test.

Full reference, matching works:
http://gskinner.com/RegExr/?2u9is

Using back references within regex, matching does not work:
http://gskinner.com/RegExr/?2u9j2

Thanks for the excellent app. I use it all the time.

Posted by: andy matthews on Jul 21, 2011 8:40am URL: http://andymatthews.net

andy - yes, it looks like a problem with your pattern. It appears that you expect the backreference to reference the pattern, but it actually references the match.

So, for example, with the string "AA", the pattern (\w)\1 would match, because the first match "A" would be backreferenced and match the second "A".

However, the string "AB" would not be matched, because the backreferenced match "A" does not match the next character "B".

http://regexr.com?2u9kf

I hope that makes sense.

Posted by: Grant Skinner on Jul 21, 2011 11:39am URL: http://gskinner.com/blog/

Ahhh. yes that does make sense. Not what I was expecting, but it's logical.

Thanks for responding Grant.

Posted by: andy matthews on Jul 21, 2011 11:52am URL: http://andymatthews.net

I was looking for a way to grep out all the files from a list of files and directories obtained from a "find ." (ie. looking for lines with a file extension ).

./tcl
./www
./www/doc
./www/accounts-data.tcl
./www/upload.tcl
./www/index.css
./www/json_response.adp
./www/index-data.adp
./www/index.adp
./www/import.adp
./www/ext_includes.adp
./www/module-use-data.adp
./www/exception-data.adp
./www/do-not-charge.tcl
./www/js
./www/js/users.js

I'm not sure if you're trying to match bash exactly but as I was experimenting, there were some differences.

".+\..+" worked in regexr, but returned nothing in grep
"[^\.][\.]" worked in grep, but highlighted the directories as well in regexpr

Posted by: saunders on Aug 11, 2011 2:21pm

Excellent tool. Thanks for sharing !

Posted by: Laven on Sep 7, 2011 1:42am

RegExr is a great tool, and I'm very grateful for the fact that you provide it for free!

I think I've spotted a couple of little bugs in tooltip display:

1. Description of "+?" in the toolkit sidebar says: "Matches 0 or more of the preceeding token.", and it should be "Matches 1 or more..."

2. Tooltip description of "(?<!t_)" in the main regex text field is "Negative lookahead matching 't_'.", I think it should be "Negative lookbehind matching..."

Very minor things in an otherwise fantastic tool!

Posted by: Matt Sach on Sep 27, 2011 2:51am

I can't tell you how helpful this tool is; thank you so much for your work on it!

Posted by: Tim Mahoney on Sep 27, 2011 7:56am URL: http://www.timothymahoney.com

Why don't you add some unicode support?

Posted by: dennis on Oct 25, 2011 9:07am URL: http://dennisprescott.com

Can you please add ability to copy the end-result/selection of the RegEx? That would be indispensable. Thanks.

Posted by: Alex on Oct 31, 2011 11:28am

If you could switch the font to a fixed-width font, that would make this tool even better. Fixed-width fonts make zeros and Os stand out more, among other things.

Posted by: Jay Williams on Nov 1, 2011 2:46pm

I use your regex tool everyday.

Posted by: stephen on Nov 2, 2011 5:44am URL: http://www.stephenjc.com

excellent job. loving the air app too. thanks

Posted by: adam on Nov 25, 2011 3:00pm

thank you so much for this wonderful tool!!

Posted by: Joe Ebel on Dec 3, 2011 3:54pm

Don't use regexes much, but when I do, I always use your tool to help myself out. Thanks.

Posted by: Matthew Pavkov on Dec 8, 2011 9:10pm

Would it be possible to have one colour highlight by grouping?

Posted by: gerdami on Dec 19, 2011 8:00am URL: http://twitter.com/gerdami

Very useful tool! You are a genius!
Can you also add monospace font for main text area? For example Courier New.
Better add possibility to user can select between monospace and non_monospace fonts.
Thanks a lot!

Posted by: Nik on Dec 20, 2011 4:39am

Excellent the work you've done on RegExr. I've used RegExBuddy for many years on the Windows world, and ever since I plunged into the Linux world I had missed something similar.

I've just discovered it and just used it once, but I'm impressed by your tool, and I'm sure it'll become my favourite tool for regular expressions.

Great job!!

Posted by: Pablo Sanz on Jan 25, 2012 5:30am

Hi, man,happy new year! You have done a great job for us and your tool makes our daily job so easy, thank you very much!

Posted by: Lea Sam on Jan 30, 2012 9:04pm URL: http://www.mygouwo.com

Can You add utf-8 support? (flag /U)

Posted by: Peaches on Feb 5, 2012 1:14am

Hi Guy !
Thanks for this application. It very useful for the team and I.
Good Job !!

Posted by: exotick on Mar 7, 2012 5:37am

Great tool ! Very helpful and simple. Dealing with regex's was never so easy. I end up using RegExr whenever I am having to deal with regex.

Thanks for your efforts !

Posted by: percy on Mar 19, 2012 9:27am

I LOVE this, thank you SO MUCH! :D

Posted by: dawmail333 on Mar 21, 2012 6:58am

Great app, it's my go to regex tool. It would be super useful if the text fields supported undo typing and tab character input (Air bug?). Anyway, great app!

Posted by: Will on Mar 28, 2012 11:09am

Great app thank you so much I can't tell you how grateful I am

Posted by: Joe C on Apr 6, 2012 1:32pm

Great to test regular expressions. Having an option to collect matches in an other textfield (using groups) would make it extremely useful.

Posted by: Ákos Kiss on Apr 19, 2012 12:31am

I love this tool so much! Thank you for providing it so generously free of charge, I really appreciate it.

Now that I've buttered you up? If you get the time, I just wish there were a way to extract the "My Saved" regexes. Is there anyway you could possibly allow for a quick export? csv, xml, text file, smoke signals, anything, please? :)

Thanks again so much!

Posted by: Chad Baker on Apr 21, 2012 2:09am

Excellent utility. If the customization of font family and size is possible (not knowing the limits of Adobe Air), RegExr would be perfect.

Posted by: John Adams on Apr 27, 2012 1:39pm

I believe negative lookbehind is broken in your code.

Posted by: Shardul Jain on May 8, 2012 2:50pm

Great little utility. Wish it had cut-paste & undo-redo support. Is this project still actively being developed? If not, ever think about making it open source?

Posted by: Ben S on May 25, 2012 1:55pm

This tool is EXCELLENT and very useful for any web developer! Thank you very very much, you're so great!!!
Luca from Italy

Posted by: Luca on May 30, 2012 5:37pm

I've run into a problem using your online app RegExr. I used it to develop a bunch of expressions, but not we are attempting to use the expressions in a C# program and they will not execute. I'm not a RegEx expert, but what are we doing wrong?

Posted by: Brendan on Jun 19, 2012 10:04am

Any chance to file a bug report?

When doing a replacement and the replacement string is empty (i.e. find something and replace it with an empty string), the generated short URL does not point to the replacement page with the filled empty string but to the match page.

Posted by: Uwe on Jun 20, 2012 4:34am URL: http://zeta.li

Very Useful tool
THANKS.

Posted by: Tafseer on Jul 13, 2012 3:46am

Thank you for this useful tool!
I have some cosmetic proposals:

1) Comments.
(?#KernelName)
The line above shows a comment. The Expression is executed the right way, but the comment is shown as capturing group
2 capturing groups:
group 1: (\w*(?#KernelName))
group 2: (?#KernelName)

2) Escaped brackets
([^\)]*(?#KernelParameters))
The line above shows a match until the next closing bracket ")"
This is not shown correctly as capturing group:
2 capturing groups:
group 1: ([^\)
group 2: (?#KernelParameters)

3) Matches
Is it possible to add a new text-box showing all matches as a list for easier copying of the results?
Something like:
group 1: "match 1", "match 2", "match 3"

Posted by: Nippey on Jul 15, 2012 11:29pm

It would be awesome if you put the source code online so we could help you update it.

Great app, thanks!

Posted by: Jaap on Jul 18, 2012 12:50am

usually the groups are referenced with slash \ char, not dollar one $

why do you use $ instead?

thanks

Posted by: marco on Aug 6, 2012 2:57am

This is great!

It would be nice if you would say what kind of regex you are doing - I would assume PCRE. It would be cool if you could switch to various types of regex: perl compatible, php (with named subpatterns), grep, bash single/double quoted.

It would also be nice if there was an option to switch the separator to a different character - I often use @ or # instead of / if I'm working with strings with a lot of slashes.

Posted by: Evan on Aug 6, 2012 5:50pm

In the examples I suggest to change the "Simplified example of matching HTML tags" to "]+>"

Posted by: Geo on Aug 14, 2012 3:10pm

the code got cut off.. :(

]+>

Posted by: Geo on Aug 14, 2012 3:12pm

<[^>]+>

Posted by: Geo on Aug 14, 2012 3:14pm

yes! :)

Posted by: Geo on Aug 14, 2012 3:15pm

Hi there,

I'm beginner in regex and I've found this tool indispensable and easy to use. Two questions:

1. What does it mean when my regular expression has a font color of red? For example, .* is displayed in red color.

2. Specific question:
----------------
Regular expression: 9*
Text input:
99
99999
99
----------------
I noticed it only matched the first line, 99, but no subsequent lines. Is there a reason why it’s not picking up the following lines? I tried different options (dotall, multiline) and got the same result. Regexpal picked up the following lines though.

Thanks,
David

Posted by: David Chen on Aug 19, 2012 4:49pm URL: http://ddchen.net

David - red text means that it is an infinite match. For example:
.*

This can match 0 characters, which means it will always find a match. That's also why 9* is only finding the first line. It matches the first two 9's, then matches the following "zero 9s" infinitely. Try using "9+" (one or more 9s) instead.

Posted by: Grant Skinner on Aug 19, 2012 4:53pm URL: http://gskinner.com/

Grant, I just found this tool, after nearly 30 years of looking for it! How did you know? :)

Seriously, I haven't stopped grinning since I installed the desktop version. I love the fact that you've included community examples, they are a fascinating resource - watching how other folks have approached the same problem from a different perspective in some cases.

What a great way to hone my regexp skills. I've already wasted hours expanded my understanding, with plenty more to go. Thanks a squillion.

May the Bluebird of Happiness never shit on your shirt.

Cheers from ɹǝpun uʍop!
PC Pete

Posted by: Pete on Sep 11, 2012 7:45am

Great tool! Lots of good stuff there. Thanks!

Just wondering if your RegExr tool can be configured to have support for different flavours of regular expressions, eg, Python, Perl, JavaScript, VBScript, XQuery, XPath, Oracle, POSIX Basic Regular Expressions, POSIX Extended Regular Expressions.

Posted by: Bruce on Sep 14, 2012 9:26am

What's going on with window newlines? Is there any way you could add a setting to make windows newlines only count as 1 newline in the RegExr? Everytime I copy/paste to/from this, it freaks out.

I imagine this is using unix newlines and windows uses \n\r

Posted by: GosuSheep on Sep 18, 2012 12:38pm

Really great tool!
Is it possible that regexr could be translated into javascript now that Adobe have discontinued development of AIR in Linux?

Posted by: Anders on Sep 29, 2012 9:59am

In Google Chrome, when pasting multiple lines of text from a <textarea>, every new line gets 2 linebreaks instead of one. So, copying


line1
line2

into regexr, turns into

line1

line2

Please fix this. Regexr is my go-to place for regex replacing, and because of this bug I can't use it for that anymore.

Posted by: Joeytje50 on Oct 5, 2012 8:01am

So.....the execute button is missing,checked Chrome, IE and Firefox...what am I missing here?

Posted by: Grant on Oct 5, 2012 7:32pm URL: http://castraconsulting.com

Grant - there is no execute button. Results update in real-time as you type.

Posted by: Grant Skinner on Oct 6, 2012 12:05am URL: http://gskinner.com/

Such a great tool for learning and mastering regular expressions. Thank you so much for the website version and especially for the desktop version.

Posted by: H2O on Oct 27, 2012 7:31am

Thank You!

This tool is just what I was missing.

Best regards,
Lars Hansen - Hillerød - Denmark

Posted by: Lars Hansen on Nov 1, 2012 3:52am URL: http://la.rshansen.dk

Hello Mr. GSkinner.

First thank you for your fantasic Regular Expression Online tool. It's the best one I have seen online.
I have a question about this one. Does there exist an option to show the filtered code of a regular expression to copy&paste it ?
It would be nice to do so. So there would be no need for another one anymore to save the results. :/

Maybe an addition checkbox or window popup to show filtered results..

Posted by: MK on Nov 5, 2012 3:45am

Great tool. I've recommended this tool to many of my co-workers.

Cheers!

Posted by: Ramesh M on Nov 20, 2012 6:22pm

A superb tool!! When I used Windows I used to work with RegBuddy. Now that I use linux I use your tool and I don't miss Regbuddy.

Great!! Thanks a lot for such a good job!

Pablo

Posted by: Pablo Sanz on Nov 30, 2012 4:23am

Thanks for the nice tool.

Just a tiny typo in the help text for the

qualifier +?
"Matches 0 or more of the preceeding token. [...]" should read
"Matches 1 or more of the preceeding token. [...]"

Posted by: do on Dec 11, 2012 4:32am

Your utility is outstanding! Thank you for this extremely helpful contribution to the world of IT.

Posted by: Jesse Wade on Dec 17, 2012 3:17pm URL: http://www.rubytuesday.com

The best tool I've ever seen. Thanks...

Posted by: Zeki on Dec 19, 2012 4:43am URL: http://www.excel.web.tr

I thought Expresso was good, but this app is a blessing! Thank you so much!

Posted by: Boulaajaj on Jan 14, 2013 2:16pm URL: http://amibou.us

BRAVO !!!

Posted by: JR on Feb 6, 2013 5:28pm URL: http://abracadabraPDF.net

Awesome !! i like this app...good job !!

Posted by: Swapnil on Feb 7, 2013 5:01pm

Just want to say thanks. This saved my day!

Posted by: Eric on Feb 11, 2013 3:27am

Very useful too. Thank you for making this available to us at no charge.

One suggestion. I find it very difficult to see what is being highlighted in the text in the whiteboard space. For example if I'm highlighting a word and the space following it I can't easily see if the space got captured. I tried increasing the Zoom and Text Size without any success. (I'm using IE8.)

If you would find a way to allow the user to pick a font size for different sections (or at a minimum the whiteboard) that would be terrific. Being able to pick a highlight color might be useful to some. (I tried, unsuccessfully, to include a screen shot.)

mike

Posted by: michael adel on Feb 14, 2013 3:20pm URL: http://qisphot.com

I am using a regex in Oracle as follows:

"(A{3}|B{3}|C{3}|D{3}|E{3}|F{3}|G{3}|H{3}|I{3}|J{3}|K{3}|L{3}|M{3}|N{3}|O{3}|P{3}|Q{3}|R{3}|S{3}|T{3}|U{3}|V{3}|X{3}|W{3}|Y{3}|Z{3})([\\x00-\\x7F]*)"

When I try to validade any string at it, it gives me the error "invalid range in regular expression". When I put a "\" character after the "\\x00" like:

"(A{3}|B{3}|C{3}|D{3}|E{3}|F{3}|G{3}|H{3}|I{3}|J{3}|K{3}|L{3}|M{3}|N{3}|O{3}|P{3}|Q{3}|R{3}|S{3}|T{3}|U{3}|V{3}|X{3}|W{3}|Y{3}|Z{3})([\\x00\-\\x7F]*)"

the error disappears. Did it really solve the problem? Is this new regex the same as the other one? Thanks!

Posted by: Roberto on Feb 15, 2013 6:27am

Thanks you very much for this useful tool !!! It work perfectly !

Posted by: anthony on Mar 29, 2013 4:20pm

I've been a developer for more years than I care to remember, and always managed to avoid regex. There are so many resources out there which just seem to make it more difficult, but 5 minutes using RegExr and I get stuff that I never did before!

Awesome, dude. Just awesome. I thank you from the bottom of my geeky heart ;-)

Posted by: TheRealStig on Apr 4, 2013 8:02am

Very useful, but would be much nicer IMO if you showed what was contained within each captured group instead of just saying that something was captured. Cheers!

Posted by: Brent on Apr 15, 2013 10:42am URL: http://NA

Regarding last comment: I just noticed that the groups DO show in the pop-up bubble, but it might be nice for them to show in the lower window (so guys like me can't miss it).

Posted by: Brent on Apr 15, 2013 10:54am

I have been using your desktop version for a few years now and I love it. What do you think about porting it to Android? I do some development on my tablet, and having a tool as awesome as yours would be great! I've tried others, but I'm spoiled by yours.

Posted by: mts7 on May 8, 2013 2:24pm

Could you please add to "capturing groups" part values if these groups ?
it would be very useful.
Thx

Posted by: Joe Scurab on May 20, 2013 2:18am

Good tool, but looks bad on 23" (1920x1080) - All elements and texts, too small )

Posted by: AGvin on Jul 11, 2013 12:43am

Very nice. I've used a lot of RegEx tools in the past, but believe that this is best. I'll try the desktop version next.

Posted by: mpolutta on Jul 23, 2013 12:16pm

Hi,
Great site. I noticed an issue with the positive look back, it looks like it is unable to handle quantifiers.
Example (Replace):

Pattern: (?<=\w+)\w
Replace: *
Target: John Smith
Expected: J*** S****
Actual: John Smith


Thanks!

Posted by: calculatorstore on Jul 29, 2013 1:28pm

Great tool. Thank you.

Could you please make the fonts bigger or adjustable?
On my huge screen I can't see your tiny letters anymore... .-)

Posted by: RegExTester on Jul 31, 2013 4:52am

My most sincere gratitude for this wonderful tool.

Posted by: Miljan on Aug 3, 2013 9:41am

Thanks for the tool.

Could you please make it save the replace and flags (ignore case, multiline etc) beside the regexp. Currently it just save regexp.

Posted by: JD on Aug 6, 2013 1:16pm

I've found this tool useful for years. Thanks for keeping it going for so long.

Posted by: DM on Aug 23, 2013 1:57pm

Amazing tool, many thanks for it!

Posted by: Kamil on Aug 25, 2013 6:02pm

Love it... very useful.

Posted by: Chris Hill on Sep 13, 2013 11:46am

"bdxxxx" won't be recognized by the regex "([abc]*)|bdx+"!

Posted by: anonymous on Sep 18, 2013 7:13am

anonymous - this is correct. Notice that the pattern is red in RegExr which indicates an infinite match. This is because the first option in your pattern can match 0 characters, so it will continue matching 0 characters infinitely.

try something like this instead:
([abc]+)|bdx+

http://regexr.com?36d1f

Posted by: Grant Skinner on Sep 18, 2013 8:32am

This is really great - helpful for us slowly struggling to learn - I like example, references, tools - and cool work. It is cool :) Thanks

Posted by: David on Oct 10, 2013 11:12am

can anybody tell me how can i use this tool, for everybody's info i am willing to use it generate/test regular expressions i will use in jMeter.

Posted by: priyadarshi on Oct 16, 2013 12:46am

Not just useful for learning, it's also great for testing patterns before implementing them. Saves me a lot of var_dump's. Thanks

Posted by: Alex M on Oct 17, 2013 6:41pm

TWO WORDS "Awesome App" Thanks

Posted by: Micheal on Oct 25, 2013 12:49am

Greg....Will you marry me?

LOL,
JoNo

Joanne Norvell

Posted by: JoNo on Oct 29, 2013 2:40pm

anyone else having problems with the RegEx tool not working?

after an update to Firefox, or more likely Flash 11.9, the tool no longer works - it loads with all fields blank and any epression entered has no effect

Posted by: 12b on Nov 1, 2013 9:54pm

I've been trying a few similar tools but this is my favourite. Great job. Agree larger font sizes would be good - also nice if you could edit your saved expressions instead of just adding or removing.
Thankyou!

Posted by: Greg Chapman on Jan 13, 2014 1:16pm

Awesome tool.

Could you possibly change the font to monospace?

Posted by: Ypthor on Jan 22, 2014 2:57am

I also agree about the larger fonts!
This is a very nice tool, and would more than perfect for us here if fonts were adjustable!

Thank you fopr this very nice tool.

Nicolas

Posted by: Nicolas on Jan 29, 2014 7:50am

There is an error in explanation: The first member of
(?<=\d)(?=(\d\d\d)+(?!\d))
you explain as Lookahead, while it's Lookbehind

And I also agree about the larger fonts!

Posted by: a0121 on Feb 4, 2014 6:04am

very nice ,thank you ~~!

Posted by: bowen xu on Feb 6, 2014 3:07am

http://www.regexr.com/ does not appear to work in Firefox 27.0.1 or IE11. Works fine in Chrome.

Posted by: AW on Feb 26, 2014 4:40am

Hi, im student and i need information about this app, like specifications and the way the program valid the regex

Posted by: Alekz on Feb 28, 2014 8:51pm

Regexr is a very useful tool, even if you're familiar with regular expressions. Thumbs up!

But something is broken with your V2. Can't use it with up-to-date FF29 beta. See here: http://imgur.com/jn2L084

Posted by: Patrick on Mar 27, 2014 4:27am

Does this have named capture support while capturing groups? Somethings like I can do in C# - (?[a-z]) will return all lower case letters in a group named AllLowerCaseLetters. Am I missing something? Excellent tool, by the way! Thanks!

Posted by: Agent_007 on Jul 14, 2014 12:11am

Hey,
Congrats for the new version, it's much more convenient, and very nice to use!!!!
Thanks for your efforts!

Nicolas

Posted by: Nicolas Combecave on Jul 14, 2014 2:41am

Very useful tool, I like your version 1.0 instead of new version of regexr. If you are planning to remove version 1.0 then please don't :)

Posted by: Saqib Softwares on Jul 15, 2014 7:36pm URL: http://www.saqibsoftwares.com