<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8044172762034419597</atom:id><lastBuildDate>Sat, 13 Apr 2013 16:33:47 +0000</lastBuildDate><category>Branding / Marketing</category><category>Company / Business</category><category>Development / Technical</category><category>Release Announcements</category><title>Regex Hero Blog</title><description>Dedicated to the online &lt;a href="http://regexhero.net/"&gt;C# regex tester at regexhero.net&lt;/a&gt;</description><link>http://blog.regexhero.net/</link><managingEditor>noreply@blogger.com (Steve Wortham)</managingEditor><generator>Blogger</generator><openSearch:totalResults>91</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RegexHeroBlog" /><feedburner:info uri="regexheroblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3164223161835972363</guid><pubDate>Sat, 13 Apr 2013 16:26:00 +0000</pubDate><atom:updated>2013-04-13T10:33:47.184-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Regex Analysis Bug Fixes</title><description>All of these updates relate to the analyzer, so if you're not a &lt;a href="https://regexhero.net/buy/"&gt;Regex Hero Professional&lt;/a&gt; user, then this won't affect you.&lt;br /&gt;
&lt;br /&gt;
I received a report of an &lt;a href="https://getsatisfaction.com/bucketsoft/topics/incorrect_analysis"&gt;analysis bug&lt;/a&gt;&amp;nbsp;related to character classes. &amp;nbsp;The regex analyzer wouldn't handle opening brackets inside a character class properly.&lt;br /&gt;
&lt;br /&gt;
It's one of the finer details of the regular expression syntax. &amp;nbsp;You wouldn't think that &lt;span style="color: #6aa84f;"&gt;&lt;b&gt;[[abc]&lt;/b&gt;&lt;/span&gt; would be valid, but it is. &amp;nbsp;You don't have to escape the opening bracket inside the character class. &amp;nbsp;So now the analyzer interprets this as it should.&lt;br /&gt;
&lt;br /&gt;
I've also fixed bugs around interpreting the &lt;span style="color: #6aa84f;"&gt;&lt;b&gt;\x00&lt;/b&gt;&lt;/span&gt; (hex), &lt;span style="color: #6aa84f;"&gt;&lt;b&gt;\u0000&lt;/b&gt;&lt;/span&gt; (unicode), and &lt;span style="color: #6aa84f;"&gt;&lt;b&gt;\k&amp;lt;group&amp;gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;(backreference) expressions.&lt;br /&gt;
&lt;br /&gt;
P.S. The &lt;a href="http://blog.regexhero.net/2013/03/regex-hero-professional-improvements.html"&gt;major updates&lt;/a&gt; I mentioned recently are still in the works. &amp;nbsp;So the price for Regex Hero Professional is still $20 for now.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=8dCp3SsqK4U:uF0PwkaZ4mw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=8dCp3SsqK4U:uF0PwkaZ4mw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=8dCp3SsqK4U:uF0PwkaZ4mw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/8dCp3SsqK4U" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/8dCp3SsqK4U/regex-analysis-bug-fixes.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2013/04/regex-analysis-bug-fixes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-6510391980396743181</guid><pubDate>Sun, 24 Mar 2013 23:33:00 +0000</pubDate><atom:updated>2013-03-24T17:43:58.632-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Company / Business</category><title>Regex Hero Professional: Improvements and Pricing</title><description>I'm working on some new features for Regex Hero, focusing primarily on bringing more advanced functionality to &lt;a href="http://regexhero.net/"&gt;Regex Hero Professional&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
New Regex Hero Professional features in the works...&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The analyzer will give you the option of automatically formatting your regular expression with comments.&lt;/li&gt;
&lt;li&gt;The tool will analyze your regular expression and offer suggestions to improve the performance. &amp;nbsp;For instance, there's a performance penalty in using IgnoreCase. &amp;nbsp;And it's pointless to use it when there's nothing case-sensitive in your regular expression. &amp;nbsp;There are many other things it'll look for, and this is something that will evolve and improve with time.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
There will be various other things I'll be working on, but these are the big 2 features. &amp;nbsp;When all of this is released, I'll also be raising the price for the Professional edition to $30. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I never make customers pay for updates. &amp;nbsp;So if you're interested in the Professional edition, I'd suggest &lt;a href="https://regexhero.net/buy/"&gt;buying it now for $20&lt;/a&gt; while you still can. &amp;nbsp;Look out for the new improvements within the next couple months.&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=1zwpUL3FDmE:-SPifC-jDBY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=1zwpUL3FDmE:-SPifC-jDBY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=1zwpUL3FDmE:-SPifC-jDBY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/1zwpUL3FDmE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/1zwpUL3FDmE/regex-hero-professional-improvements.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2013/03/regex-hero-professional-improvements.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-2551689754917532987</guid><pubDate>Fri, 01 Feb 2013 18:42:00 +0000</pubDate><atom:updated>2013-02-01T14:33:53.586-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>"Redo" on a Mac, and a Group Name Warning</title><description>Today I released a minor update, fixing a couple bugs:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;"Redo" functionality now works as it should on a Mac via the&amp;nbsp;Command-Shift-Z keyboard shortcut.&lt;/li&gt;
&lt;li&gt;I've added a group name warning. &amp;nbsp;There's a weird issue with the way the .NET Regex engine allows numeric entries in group names. &amp;nbsp;For instance &lt;span style="font-family: Courier New, Courier, monospace;"&gt;(?&lt;2&gt;abc)|&lt;/2&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;(?&lt;4&gt;def)&lt;/4&gt;&lt;/span&gt;&amp;nbsp;will not throw an error upon instantiation. &amp;nbsp;However, when you enumerate through the groups that's when you get a runtime error. &amp;nbsp;So I've added a rule to show a warning in this case that says, "Group names must begin with a word character, or if they're numeric they cannot have gaps between numbers."&lt;!--1a--&gt;&lt;!--123--&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=ACcEj2X-t1I:RufmEOBdNfY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=ACcEj2X-t1I:RufmEOBdNfY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=ACcEj2X-t1I:RufmEOBdNfY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/ACcEj2X-t1I" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/ACcEj2X-t1I/redo-on-mac-and-group-name-warning.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2013/02/redo-on-mac-and-group-name-warning.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-7186239370901392704</guid><pubDate>Tue, 25 Sep 2012 23:22:00 +0000</pubDate><atom:updated>2012-09-25T17:22:04.785-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>C# Strings and Code Generation Bug Fixed</title><description>It was brought to my attention yesterday that there was a bug with the C# code generation feature inside Regex Hero. &amp;nbsp;&lt;a href="https://getsatisfaction.com/bucketsoft/topics/regex_hero_group_matches_results_in_c"&gt;Thanks Blake for pointing it out&lt;/a&gt;. &amp;nbsp;It turns out that I had made a stupid mistake in the way I was adding \r and \n to the string. &amp;nbsp;I mostly rely on the @"string" literals because they're convenient and generally cleaner for what I need to do. &amp;nbsp;But of course, the escaped notations \r and \n don't work inside those strings. &lt;br /&gt;
&lt;br /&gt;
So this has been updated this morning. &amp;nbsp;From now on Regex Hero will generate C# strings more like this...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;@"line1" + "\n" + @"line2"&lt;/span&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=XXrtnOYvy6Q:5vYD02UT3pU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=XXrtnOYvy6Q:5vYD02UT3pU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=XXrtnOYvy6Q:5vYD02UT3pU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/XXrtnOYvy6Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/XXrtnOYvy6Q/c-strings-and-code-generation-bug-fixed.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/09/c-strings-and-code-generation-bug-fixed.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-6710421910686990269</guid><pubDate>Sat, 15 Sep 2012 23:23:00 +0000</pubDate><atom:updated>2012-09-15T17:23:41.940-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Optimized Memory Consumption</title><description>Today's update includes a minor change to the custom undo/redo system in all of the textboxes within Regex Hero. &amp;nbsp;They will now only store history on the OnKeyUp event, rather than storing history for every change. &amp;nbsp;In other words, if you hold down a key on the keyboard for a long time it's not going to store history for every single character individually anymore.&lt;br /&gt;
&lt;br /&gt;
This is a subtle difference, but in real world usage this should have a substantial impact on how much memory is used to hold the text history.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=oSoEX8-7K20:Sqwa0iWZgEY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=oSoEX8-7K20:Sqwa0iWZgEY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=oSoEX8-7K20:Sqwa0iWZgEY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/oSoEX8-7K20" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/oSoEX8-7K20/optimized-memory-consumption.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/09/optimized-memory-consumption.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-5749935198903340228</guid><pubDate>Tue, 11 Sep 2012 15:27:00 +0000</pubDate><atom:updated>2012-09-11T09:37:14.662-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Development / Technical</category><title>ASP.NET MVC DataAnnotations and the RegularExpressionAttribute</title><description>A fellow Regex Hero user emailed me this morning about an inconsistency between what they were seeing in Regex Hero vs what they were seeing with the &lt;a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.regularexpressionattribute.pattern.aspx"&gt;RegularExpression DataAnnotation in ASP.NET MVC&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
As a test, they were trying the following regular expression...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;^A|B|C$&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Against this string...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: #990000;"&gt;ABC&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In Regex Hero you see 3 matches (as you should). &amp;nbsp;But in ASP.NET MVC it doesn't match, and validation fails. &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Why is this?&lt;/h3&gt;
&lt;span style="font-family: inherit;"&gt;As it turns out, the RegularExpressionAttribute is hiding an implementation detail. &amp;nbsp;In fact, I couldn't even find any mention of this on MSDN.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: inherit;"&gt;It's most plainly visible if you open up the Javascript file that comes with an MVC project template,&amp;nbsp;MicrosoftMvcValidation.js. &amp;nbsp;Inside you'll find this bit of code...&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: white; color: #222222; font-size: 13px;"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;var $0=new RegExp(this.$0);&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; font-size: 13px;"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;var $1=$0.exec(value);&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; font-size: 13px;"&gt;
&lt;span style="font-family: Courier New, Courier, monospace;"&gt;return (!Sys.Mvc._ValidationUtil.$0($&lt;wbr&gt;&lt;/wbr&gt;1) &amp;amp;&amp;amp;&amp;nbsp;&lt;span style="background-color: yellow;"&gt;$1[0].length===value.length&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; font-size: 13px;"&gt;
&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222;"&gt;
&lt;span style="color: black; font-family: inherit;"&gt;I've highlighted the important piece. It's checking to make sure the text value's length is equal to the match's length. &amp;nbsp;In other words, the validation is designed to prevent any extraneous input beyond what a single regular expression match contains. &amp;nbsp;And it does the same thing server side as well.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222;"&gt;
&lt;span style="color: black; font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white;"&gt;
&lt;span style="font-family: inherit;"&gt;&lt;span style="color: black;"&gt;So for&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: transparent;"&gt;RegularExpressionAttribute&lt;/span&gt;&lt;span style="color: black;"&gt;&amp;nbsp;testing purposes in &lt;a href="http://regexhero.net/tester/"&gt;Regex Hero&lt;/a&gt; you could just always use ^ and $ anchors for every regular expression. &amp;nbsp;And then check to make sure that you're getting 1 match, and 1 match only.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=69s75EmSclg:59STP_QFLtI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=69s75EmSclg:59STP_QFLtI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=69s75EmSclg:59STP_QFLtI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/69s75EmSclg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/69s75EmSclg/aspnet-mvc-dataannotations-and.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>1</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/09/aspnet-mvc-dataannotations-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-8250481420756884832</guid><pubDate>Mon, 06 Aug 2012 22:23:00 +0000</pubDate><atom:updated>2012-08-06T16:26:07.805-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Improved TextBoxes With Better Whitespace Support</title><description>Today's update is all about whitespace.  I've created a new textbox control for &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; which is now being used for the 4 main textboxes: Regular Expression, Replacement String, Target String, and Final String.
&lt;br /&gt;
&lt;br /&gt;
The new features are as follows:&lt;br /&gt;
&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;span style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-Tfwr09dRb2s/UCBB7fSbB0I/AAAAAAAAAe8/nVFcTunPknM/s1600/matching-linefeeds.png" /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Figure 1: Matching Line Feeds&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Handles tab characters as it should.  You can test this by entering \t in your regular expression and then hitting tab in your target string.&lt;/li&gt;
&lt;li&gt;Matching carriage returns or line feeds are now visible with a half-width character block (as seen in the figure 1).&lt;/li&gt;
&lt;li&gt;You may preserve the formatting of pasted text with the new "Preserve pasted formatting" option. &amp;nbsp;This will &lt;a href="https://getsatisfaction.com/bucketsoft/topics/when_pasting_a_target_string_r_gets_converted_to_n_does_desktop_version_do_this"&gt;retain the existing line endings of your source text&lt;/a&gt; as was suggested about a month ago.&lt;/li&gt;
&lt;li&gt;Cycling through your matches with the up &amp;amp; down buttons is now much more responsive.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=-I3DsAcZMcE:lcdd79Pi-BQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=-I3DsAcZMcE:lcdd79Pi-BQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=-I3DsAcZMcE:lcdd79Pi-BQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/-I3DsAcZMcE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/-I3DsAcZMcE/improved-textboxes-with-better.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Tfwr09dRb2s/UCBB7fSbB0I/AAAAAAAAAe8/nVFcTunPknM/s72-c/matching-linefeeds.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/08/improved-textboxes-with-better.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-1542829291714189123</guid><pubDate>Sat, 30 Jun 2012 20:46:00 +0000</pubDate><atom:updated>2012-06-30T16:58:11.000-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Company / Business</category><title>Now Supporting Facebook and Twitter Logins</title><description>This is something I've wanted to have for a long time but I simply haven't set aside the time to do it.&lt;br /&gt;
&lt;br /&gt;
Well, no more waiting, Regex Hero now supports logging in with Facebook and Twitter...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" height="270" src="http://2.bp.blogspot.com/-YhTiHixxPGM/T-9lN6ysoqI/AAAAAAAAAdw/gForRstgK7k/s640/login-screenshot.png" width="640" /&gt;&lt;/div&gt;
&lt;br /&gt;
If you already have an account with Regex Hero and want to sign in with something else (such as Facebook or Twitter) then you can &lt;a href="https://regexhero.net/user/login/?add=secondary"&gt;add it to your account&lt;/a&gt;. &amp;nbsp;Or if you're a brand new user of Regex Hero, &lt;a href="https://regexhero.net/user/"&gt;create your account here&lt;/a&gt;.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=bHNbPD7NadI:lXhI4BgtRQs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=bHNbPD7NadI:lXhI4BgtRQs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=bHNbPD7NadI:lXhI4BgtRQs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/bHNbPD7NadI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/bHNbPD7NadI/now-supporting-facebook-and-twitter.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-YhTiHixxPGM/T-9lN6ysoqI/AAAAAAAAAdw/gForRstgK7k/s72-c/login-screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/06/now-supporting-facebook-and-twitter.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-1406826932475052214</guid><pubDate>Sun, 17 Jun 2012 23:21:00 +0000</pubDate><atom:updated>2012-06-17T17:21:52.097-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>New Benchmarking Features and a New Homepage Design</title><description>Today I updated the benchmarking tool in Regex Hero with some new functionality.&lt;br /&gt;
&lt;br /&gt;
There were essentially two things I was looking to accomplish:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create insight into the benchmarking tool so that developers know exactly what it's doing.&lt;/li&gt;
&lt;li&gt;Add the ability to benchmark your regular expression with the IsMatch() function. &amp;nbsp;IsMatch() simply returns true if your regular expression has even 1 match in the specified string. &amp;nbsp;As such, it actually stops searching after the first match is found. &amp;nbsp;In some cases this makes it many times faster than iterating through every match.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
So now you'll see some new options to take care of all this...&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://regexhero.net/tester/"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-D59iqHjQs1s/T95i5pTx01I/AAAAAAAAAcg/dHAUqYJlziA/s1600/benchmark-options.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can click the Show/Hide benchmarking code button at any point if you want to know exactly what Regex Hero is going to do under every benchmarking loop. &amp;nbsp;There are effectively 4 different benchmarking modes: 2 modes when the Match tab is selected, 1 mode for Replace, and 1 mode for Split.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Homepage Redesign&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And of course I've redesigned the homepage. &amp;nbsp;It's not too drastic of a departure from the old design. &amp;nbsp;One problem I wanted to solve was that the Regex Hero character used to point to the big "Regex Hero" title at the top of the page as you see here...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://regexhero.net/"&gt;&lt;img border="0" height="348" src="http://2.bp.blogspot.com/-R5zikFy729Y/T6FrITJmetI/AAAAAAAAAbs/-KUEItG-lgo/s640/regex-hero-homepage.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
The problem with this was that the Regex Hero title at the top is actually a link back to the homepage. &amp;nbsp;So if you click it, all you'll see is the page reload. &amp;nbsp;And I found through Google Analytics there were a good number of people clicking this link from the homepage, suggesting that maybe the chubby pointing finger was influencing where people clicked.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
So the new design takes this idea and uses it to point to where you should actually click...&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-p088_DrIb9U/T95lnAOSiWI/AAAAAAAAAcs/5dSXhL6xUO4/s1600/new-homepage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="356" src="http://1.bp.blogspot.com/-p088_DrIb9U/T95lnAOSiWI/AAAAAAAAAcs/5dSXhL6xUO4/s640/new-homepage.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=I6bXGNv0k8g:ryhfxQq9ZxY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=I6bXGNv0k8g:ryhfxQq9ZxY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=I6bXGNv0k8g:ryhfxQq9ZxY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/I6bXGNv0k8g" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/I6bXGNv0k8g/new-benchmarking-features-and-new.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-D59iqHjQs1s/T95i5pTx01I/AAAAAAAAAcg/dHAUqYJlziA/s72-c/benchmark-options.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/06/new-benchmarking-features-and-new.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-8646130669337026988</guid><pubDate>Wed, 13 Jun 2012 03:07:00 +0000</pubDate><atom:updated>2012-06-13T20:46:32.918-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Highlighting for Regex Group Pairings</title><description>I added a new feature where the respective group starting and ending will be highlighted in gray when the cursor is on either the start or end of the group. &amp;nbsp;This is especially useful when you have a large regular expression with many groups, or perhaps nested groups as below...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://regexhero.net/tester/"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-z5rgWe7inhk/T9gDFGZ_CzI/AAAAAAAAAcQ/Ltp2w7K23Xo/s1600/nested-groups-3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The idea for this comes right from Visual Studio 2010 which of course I use everyday. &amp;nbsp;And this feature is very responsive because of the fact that Regex Hero doesn't have to reparse anything when you're simply moving the cursor around. &amp;nbsp;Once again, the new parser is doing its job very well.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=TXnRKFsdpX8:xAcOfPMfiYw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=TXnRKFsdpX8:xAcOfPMfiYw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=TXnRKFsdpX8:xAcOfPMfiYw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/TXnRKFsdpX8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/TXnRKFsdpX8/highlighting-for-regex-group-pairings.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-z5rgWe7inhk/T9gDFGZ_CzI/AAAAAAAAAcQ/Ltp2w7K23Xo/s72-c/nested-groups-3.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/06/highlighting-for-regex-group-pairings.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-5507546662502122291</guid><pubDate>Mon, 11 Jun 2012 02:17:00 +0000</pubDate><atom:updated>2012-06-10T20:17:23.584-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Improved Regex Code Completion and Bug Fixes</title><description>I've taken another step towards leveraging the new regex parser this weekend. &amp;nbsp;This time I've completely removed all dependencies on the old parser for the purposes of regex code completion. &amp;nbsp;So the syntax highlighter and code completion features are both running on the new parser. &amp;nbsp;This saves precious clock cycles and makes Regex Hero a little more efficient. &amp;nbsp;And then I've introduced full support for Unicode general categories and named blocks denoted by the &lt;b&gt;\p{name}&lt;/b&gt; or &lt;b&gt;\P{name}&lt;/b&gt; syntax. &amp;nbsp;So you'll get regex code completion for this as well.&lt;br /&gt;
&lt;br /&gt;
In addition to this I've solved a few bugs:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The analyzer would get out of sync under certain situations, causing the list to be tabbed over needlessly.&lt;/li&gt;
&lt;li&gt;Code completion would have issues when you try to navigate down the list and then back past the top result with the arrow keys. &amp;nbsp;Hitting down again wouldn't return focus to the list as it should. &amp;nbsp;I actually changed this behavior so the list will disappear if you do this.&lt;/li&gt;
&lt;li&gt;Copying and pasting multiple lines of text within Regex Hero would create carriage returns which prevented the "End" button on the keyboard from advancing to the end of the line.&lt;/li&gt;
&lt;/ul&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=2poGe8fPVBc:qMFEgbUFkts:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=2poGe8fPVBc:qMFEgbUFkts:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=2poGe8fPVBc:qMFEgbUFkts:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/2poGe8fPVBc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/2poGe8fPVBc/improved-regex-code-completion-and-bug.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/06/improved-regex-code-completion-and-bug.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-2548154162260547230</guid><pubDate>Sun, 03 Jun 2012 21:51:00 +0000</pubDate><atom:updated>2012-06-03T15:53:57.861-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>New Regex Parser, Improved Syntax Highlighter, and More on the Way</title><description>During the past couple weeks I've been working on a revised version of my regex parser. &amp;nbsp;For those who haven't followed my old posts about this parser, it's what makes some of the more advanced features in Regex Hero possible. &amp;nbsp;It's being used for code completion, regex analysis, and the syntax highlighter.&lt;br /&gt;
&lt;br /&gt;
Well, my new &amp;amp; improved parser is both faster and more powerful. &amp;nbsp;Today I released an update which uses the new parser for the syntax highlighter. &amp;nbsp;It's roughly twice as fast as the old parser. &amp;nbsp;And the syntax highlighting is a little smarter now about detecting unclosed brackets or parentheses, and highlighting the offending section in red. &amp;nbsp;It'll also highlight invalid character constructs such as \g in red.&lt;br /&gt;
&lt;br /&gt;
But this is just the tip of the iceberg. &amp;nbsp;There are a lot of improvements coming that'll be made possible by this new parser. &amp;nbsp;Stay tuned for updates.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=IiBnFzYJaes:yyHHYw2pjTc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=IiBnFzYJaes:yyHHYw2pjTc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=IiBnFzYJaes:yyHHYw2pjTc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/IiBnFzYJaes" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/IiBnFzYJaes/new-regex-parser-improved-syntax.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/06/new-regex-parser-improved-syntax.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3445515464612229242</guid><pubDate>Sun, 01 Apr 2012 20:36:00 +0000</pubDate><atom:updated>2012-04-02T09:14:24.972-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Faster Load Times for Regex Hero</title><description>I took a lesson from my own blog post yesterday about &lt;a href="http://blog.regexhero.net/2012/03/quick-tip-about-using.html"&gt;lazy loading&lt;/a&gt; and made some drastic improvements to the load time of &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; today.  Essentially I'm now loading things like the analyzer and benchmark tool only when they're first called.  This reduces the amount of work that has to be done when Regex Hero is first launched.  And it should even reduce memory consumption a little bit if you're not using these features.  The end result is that Regex Hero loads about half a second faster than before.  This affects both the web version and the desktop version.  Enjoy.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=6XXwAfqgTqE:h9S_1xaDm6c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=6XXwAfqgTqE:h9S_1xaDm6c:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=6XXwAfqgTqE:h9S_1xaDm6c:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/6XXwAfqgTqE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/6XXwAfqgTqE/faster-load-times.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/04/faster-load-times.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-1772956646781847112</guid><pubDate>Sat, 31 Mar 2012 22:29:00 +0000</pubDate><atom:updated>2012-04-02T09:13:42.874-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Development / Technical</category><title>A Quick Tip About Using RegexOptions.Compiled</title><description>Since Silverlight doesn't support RegexOptions.Compiled, it's the one option that's missing from &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In a full .NET application there may be times when it's worth it to use this option. &amp;nbsp;It adds significant cost to initializing the Regex instance, but it can also double the speed of the regular expression itself in some cases. &amp;nbsp;Therefore it's best to use when you can instantiate the Regex object once, and reuse it many times. &amp;nbsp;Jeff Atwood talks about this very point in his article, &lt;a href="http://www.codinghorror.com/blog/2005/03/to-compile-or-not-to-compile.html"&gt;To Compile or Not to Compile&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
So if you've determined in your case that RegexOptions.Compiled is worth the initial cost of compilation, then I'm going to offer one simple solution that we as programmers often forget about.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Lazy Loading&lt;/b&gt;&lt;br /&gt;
The advantage with lazy loading is that the object we're concerned about is only instantiated when it's first accessed. &amp;nbsp;Therefore, we can use RegexOptions.Compiled without necessarily hurting the initial start-up time of our application.  In some cases we can even avoid needlessly instantiating objects...&lt;br /&gt;

&lt;pre class="prettyprint"&gt;&lt;code&gt;private static Regex _LibraryTagsRegex = null;
public static Regex LibraryTagsRegex
{
 get
 {
  if (_LibraryTagsRegex == null)
  {
   _LibraryTagsRegex = new Regex(@"^library/tagged/(?&amp;lt;Tags&amp;gt;.+)", RegexOptions.Compiled);
  }
  return _LibraryTagsRegex;
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;br /&gt;
&lt;br /&gt;
We can then call the static LibraryTagsRegex in the example above from anywhere in our code, and it's only going to be instantiated the first time it's accessed.  
&lt;br /&gt;&lt;br /&gt;

By the way, in my test I was able to perform 2 million LibraryTagsRegex.IsMatch() calls in &lt;b&gt;256 ms&lt;/b&gt; with the Compiled option (as above) vs &lt;b&gt;461 ms&lt;/b&gt; without it.  The compilation time for a Regex this simple is very small and this scenario completely justifies the use of RegexOptions.Compiled.
&lt;br /&gt;
&lt;br /&gt;
You can also pull this off with the &lt;a href="http://msdn.microsoft.com/en-us/library/dd997286.aspx#Y200"&gt;Lazy&lt;/a&gt; type new to C# 4.0...&lt;br /&gt;
&lt;pre class="prettyprint"&gt;&lt;code&gt;public static Lazy&amp;lt;Regex&amp;gt; LibraryTagsRegex = 
    new Lazy&amp;lt;Regex&amp;gt;(() =&amp;gt; new Regex(@"^library/tagged/(?&amp;lt;Tags&amp;gt;.+)", RegexOptions.Compiled));
&lt;/code&gt;&lt;/pre&gt;

Then you'd just reference LibraryTagsRegex.Value in your code.


&lt;style type="text/css"&gt;
/* Pretty printing styles. Used with prettify.js. */

.str { color: #080; }
.kwd { color: #008; }
.com { color: #800; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
.prettyprint { background-color: #f4f4f4; padding: 2px; }

/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #eee }

@media print {
  .str { color: #060; }
  .kwd { color: #006; font-weight: bold; }
  .com { color: #600; font-style: italic; }
  .typ { color: #404; font-weight: bold; }
  .lit { color: #044; }
  .pun { color: #440; }
  .pln { color: #000; }
  .tag { color: #006; font-weight: bold; }
  .atn { color: #404; }
  .atv { color: #060; }
}
&lt;/style&gt;

&lt;script type="text/javascript" src="http://www.bucketsoft.com/js/prettify/prettify.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
prettyPrint();
&lt;/script&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=CLbWEz4uv7c:ZQ69_2cgJHc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=CLbWEz4uv7c:ZQ69_2cgJHc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=CLbWEz4uv7c:ZQ69_2cgJHc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/CLbWEz4uv7c" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/CLbWEz4uv7c/quick-tip-about-using.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/03/quick-tip-about-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-8605317650420731953</guid><pubDate>Tue, 20 Mar 2012 16:58:00 +0000</pubDate><atom:updated>2012-04-02T09:15:19.037-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><category domain="http://www.blogger.com/atom/ns#">Development / Technical</category><title>Faster Regex Syntax Highlighter</title><description>After the recent performance improvements to the analyzer I found that the next bottleneck was the regex syntax highlighter.  You know, that's what paints your regular expression pretty colors.&lt;br /&gt;
&lt;br /&gt;
The slowness has probably affected fewer than 1% of the &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; population.  I say that because it was only really perceivable when dealing with a regular expression over 2,000 characters long.&lt;br /&gt;
&lt;br /&gt;
Nevertheless, I had an idea for how I can improve it.  The slowness had nothing to do with parsing speed, and everything to do with how I was drawing the characters.  I was dynamically adding characters in colored sections to a single text block to create the colored effect.  This, as it turns out, is not optimal.  So what I did is I created text blocks on top of eachother (one for each color), and then simply assign the appropriate text values to each one.&lt;br /&gt;
&lt;br /&gt;
For example, the text blocks might be composed of...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;test&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &lt;span style="color: blue;"&gt;(&lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span style="color: blue;"&gt;)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: #38761d;"&gt;\d\w&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="color: #741b47;"&gt;+&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
And since they're all on top of eachother this is what you see...&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;test&lt;span style="color: blue;"&gt;(&lt;/span&gt;&lt;span style="color: #38761d;"&gt;\d\w&lt;/span&gt;&lt;span style="color: blue;"&gt;)&lt;/span&gt;&lt;span style="color: #741b47;"&gt;+&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The effect is exactly the same as it was before, but this is at least 3 times faster.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=IasvSHgG7SI:1oFRpQ4ITrU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=IasvSHgG7SI:1oFRpQ4ITrU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=IasvSHgG7SI:1oFRpQ4ITrU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/IasvSHgG7SI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/IasvSHgG7SI/faster-regex-syntax-highlighter.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/03/faster-regex-syntax-highlighter.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-6856228840506415408</guid><pubDate>Mon, 19 Mar 2012 00:18:00 +0000</pubDate><atom:updated>2012-04-02T09:15:47.970-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Faster Regex Analysis</title><description>Today I got rid of the tree view in the analyzer in favor of a staggered listbox. It was kind of cool to be able to expand or collapse individual items in the tree view, but it came at a cost. &amp;nbsp;The tree view is extremely slow when you're constantly updating it. &amp;nbsp;And of course, since everything in &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; is supposed to happen in real-time, the tree view had to go.&lt;br /&gt;
&lt;br /&gt;
With today's changes the analyzer feature is now at least 5 times faster. &amp;nbsp;And with the staggered listbox we can still easily visualize the nested nature of a regular expression, as you can see in the example below...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://regexhero.net/tester/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-uazXRMzNlZs/T2Z6rpOkT7I/AAAAAAAAAaE/rnaEN2l-4qE/s1600/analyzer-listbox.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=VIEtLEqGf3M:woXEvzKMhUM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=VIEtLEqGf3M:woXEvzKMhUM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=VIEtLEqGf3M:woXEvzKMhUM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/VIEtLEqGf3M" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/VIEtLEqGf3M/faster-regex-analysis.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-uazXRMzNlZs/T2Z6rpOkT7I/AAAAAAAAAaE/rnaEN2l-4qE/s72-c/analyzer-listbox.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/03/faster-regex-analysis.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-6878410861614061506</guid><pubDate>Sat, 17 Mar 2012 23:26:00 +0000</pubDate><atom:updated>2012-03-17T17:53:22.674-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><category domain="http://www.blogger.com/atom/ns#">Development / Technical</category><title>Optimizing Your Regular Expressions</title><description>Regular expressions will backtrack. &amp;nbsp;That's an unfortunate thing about them because backtracking can be slow. &amp;nbsp; &amp;nbsp;And in certain (rare) cases the performance can become so awful that executing the regular expression against a relatively short string could take over a minute. &amp;nbsp;There's a good article about &lt;a href="http://www.regular-expressions.info/catastrophic.html"&gt;catastrophic backtracking over at regular-expressions.info&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
And today I created a video about all of this called&amp;nbsp;&lt;a href="http://regexhero.net/videos/12/optimizing-for-performance"&gt;Regex Lesson 5: Optimization&lt;/a&gt;. &amp;nbsp;In the video I start with a very poorly written regular expression and make several improvements to it, using the benchmarking feature along the way. &amp;nbsp;By the end of the video I make the regular expression over 3 &lt;u&gt;million&lt;/u&gt; times faster.&lt;br /&gt;
&lt;br /&gt;
In addition, today's update to Regex Hero provides a little message in the event that you encounter a regular expression that takes over 10 seconds to evaluate...&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-G17_aBKP1jI/T2UXPAtECRI/AAAAAAAAAZ8/cOeBH_0-d9M/s1600/very-slow-message.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-G17_aBKP1jI/T2UXPAtECRI/AAAAAAAAAZ8/cOeBH_0-d9M/s1600/very-slow-message.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And then last of all, I changed the benchmarking feature a bit. &amp;nbsp;In the past it would simply test your regular expression against your string and iterate over the matches. &amp;nbsp;It would repeat this process as many times as it could in 1 second. &amp;nbsp;The trouble was that it did the same thing even if you had the Replace or Split tab selected. &amp;nbsp;But now the benchmarking will actually do replacement operations when the Replace tab is selected, and it'll do split operations when the Split tab is selected.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=9w40mPczUuU:SLkt0A-lc1g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=9w40mPczUuU:SLkt0A-lc1g:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=9w40mPczUuU:SLkt0A-lc1g:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/9w40mPczUuU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/9w40mPczUuU/optimizing-your-regular-expressions.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-G17_aBKP1jI/T2UXPAtECRI/AAAAAAAAAZ8/cOeBH_0-d9M/s72-c/very-slow-message.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/03/optimizing-your-regular-expressions.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-8195552394012210264</guid><pubDate>Fri, 02 Mar 2012 02:37:00 +0000</pubDate><atom:updated>2012-04-02T09:16:36.488-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Benchmarking Bug Fix</title><description>Today's update is a small one. &amp;nbsp;I discovered that under certain situations the benchmarking feature in &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; would fail and return NaN values. &amp;nbsp;I solved this problem today so we shouldn't be seeing that again.&lt;br /&gt;
&lt;br /&gt;
I also made a couple recent changes to the site for better performance. &amp;nbsp;For one, I switched from the Rackspace CDN I was using back to Amazon CloudFront. &amp;nbsp;Amazon's CDN isn't necessarily the fastest in all countries, but it's very reliable and consistent. &amp;nbsp;Then I extended the cache/expiration settings for the site's CSS file and the loading screen for Regex Hero so repeat visitors should enjoy improved responsiveness.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=0N4_X-wGtzw:W7IbBIEQ4bg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=0N4_X-wGtzw:W7IbBIEQ4bg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=0N4_X-wGtzw:W7IbBIEQ4bg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/0N4_X-wGtzw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/0N4_X-wGtzw/benchmarking-bug-fix.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2012/03/benchmarking-bug-fix.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-5647210610710409682</guid><pubDate>Thu, 06 Oct 2011 18:09:00 +0000</pubDate><atom:updated>2012-04-02T09:18:07.167-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Asynchronous Regex Matching and Highlighting</title><description>&lt;p&gt;I came across a question on StackOverflow the other day where someone was trying to find the culprit for an unusually slow running regular expression.  In fact it'd take around 30 seconds to execute.  This was a rather extreme case of &lt;a href="http://www.regular-expressions.info/catastrophic.html"&gt;catastrophic backtracking&lt;/a&gt;.  With just a few minor tweaks someone was able to drastically improve the performance, making it about 48,000 times faster.  Yeah, pretty drastic and it really illustrates the importance of running a simple benchmark to test any regular expression that'll see heavy use.&lt;/p&gt;

&lt;p&gt;It's rare that someone will write such a poor performing regular expression, especially by accident.  But nevertheless, this circumstance is one where &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; failed miserably.  The trouble is that the regular expression was evaluated synchronously as you type.  So if you're dealing with a slow running regular expression, this would actually hang the UI temporarily until it's finished.  It was an ugly thing.  But no more.  As of today, &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; now evaluates the regular expression on a separate thread, returns the results, and then highlights the matches.  This asynchronous approach is much more user friendly as the UI is always responsive.  In addition to this, by running the regular expression on a separate thread from the UI, Regex Hero is able to take better advantage of multi-core processors, actually improving the overall performance of the application.  These are all good things.  I hope you enjoy it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=NLksGI5PU3M:DGNht_maKPc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=NLksGI5PU3M:DGNht_maKPc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=NLksGI5PU3M:DGNht_maKPc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/NLksGI5PU3M" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/NLksGI5PU3M/asynchronous-regex-matching-and.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/10/asynchronous-regex-matching-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-161810719236306701</guid><pubDate>Tue, 16 Aug 2011 22:57:00 +0000</pubDate><atom:updated>2011-08-16T16:57:10.407-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Alternating highlighting, new string copy options, and more</title><description>&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-1cWenOCeYmk/TkryeSRvnjI/AAAAAAAAAVk/h4ymVxdwX0k/s1600/alternating-colors.PNG" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"&gt;&lt;img border="0" height="188" width="396" src="http://1.bp.blogspot.com/-1cWenOCeYmk/TkryeSRvnjI/AAAAAAAAAVk/h4ymVxdwX0k/s400/alternating-colors.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Alternating Highlighting&lt;/b&gt;&lt;br /&gt;
I got some great feedback recently.  First, magneticmail on GetSatisfaction suggested that I &lt;a href="http://getsatisfaction.com/bucketsoft/topics/different_colors_for_odd_and_even_matches"&gt;create two colors for Regex Hero's highlighting&lt;/a&gt;: an odd color and an even color.  This had crossed my mind before but I hadn't really given it much thought.  My initial concern is that introducing a new color could cause some confusion.  What does the color mean?  But after thinking about it, implementing it, and playing with it myself, I think it's simple enough.  Once you actually write an expression that has 3 or more matches, it becomes obvious that the two colors simply alternate to provide some visual distinction.  And the value that the visual distinction brings with it outweighs any potential confusion, I believe.  So, thank you magneticmail for the suggestion.  It's a simple change, but hopefully a change for the better.  Let me know what you guys think in the comments.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Move to target string and start a new expression&lt;/b&gt;&lt;br /&gt;
This idea came from the author of &lt;a href="http://regexrenamer.sourceforge.net/"&gt;RegexRenamer&lt;/a&gt;.  The idea is to improve the workflow slightly when using the replace functionality to make incremental changes to a block of text.  So you perform your replace operation, click the "Final String" heading, and then click "Move to target string and start a new expression".  This will do just what it says, moving the final string to the target string, and clearing out the regular expression and replacement strings so you can start your next replacement operation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-npBzB0b5dQ0/TkrzP1GAWNI/AAAAAAAAAVs/-Ko7RpKaoF0/s1600/copy-as.PNG" imageanchor="1" style="clear:right; float:right; margin-left:1em; margin-bottom:1em"&gt;&lt;img border="0" height="133" width="220" src="http://4.bp.blogspot.com/-npBzB0b5dQ0/TkrzP1GAWNI/AAAAAAAAAVs/-Ko7RpKaoF0/s400/copy-as.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;Copy as a C# String or Copy as a VB.NET String&lt;/b&gt;&lt;br /&gt;
The .NET code generation feature has always created C# or VB.NET friendly code snippets, with properly escaped strings.  Now you can actually grab properly escaped C# or VB.NET strings from any of the 4 subheadings: Regular Expression, Replacement String, Target String, or Final String.&lt;br /&gt;
&lt;br /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=jZt5n8TUEEM:-0p7NTYdrnc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=jZt5n8TUEEM:-0p7NTYdrnc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=jZt5n8TUEEM:-0p7NTYdrnc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/jZt5n8TUEEM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/jZt5n8TUEEM/alternating-highlighting-new-string.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-1cWenOCeYmk/TkryeSRvnjI/AAAAAAAAAVk/h4ymVxdwX0k/s72-c/alternating-colors.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/08/alternating-highlighting-new-string.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3421187342974723622</guid><pubDate>Tue, 09 Aug 2011 20:44:00 +0000</pubDate><atom:updated>2012-04-02T09:19:17.239-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Company / Business</category><title>Skype Screen Sharing with Steve</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.skype.com/intl/en-us/get-skype/" target="_blank" imageanchor="1" style="clear:left; float:right;margin: 0 20px;"&gt;&lt;img border="0" height="200" width="200" src="http://2.bp.blogspot.com/-Hg73xTXKt60/TkGZ3BC2C_I/AAAAAAAAAVc/JzwTg66J7K8/s400/skype_logo.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;I've had good Regex Hero feedback slowly trickle in through GetSatisfaction, email, and a few phone calls over the past couple years.  It's great to hear from you guys as I've been made aware of problems that I never knew I had.&lt;br /&gt;
&lt;br /&gt;
And so in the spirit of improving &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt;, I want to try something new.  I'm inviting all Regex Hero fans to contact me via Skype for a 30 minute one-on-one &lt;a href="http://www.skype.com/intl/en-us/features/allfeatures/screen-sharing/" target="_blank"&gt;screen sharing&lt;/a&gt; session.  This will be an opportunity for me to learn about problems you're having with Regex Hero and help out any way I can.  Perhaps you're having trouble figuring out how to do something very specific in Regex Hero.  It could be that a feature is missing, or simply isn't as obvious as it should be.  Or perhaps you're having trouble with a regular expression and just need a little help.  In either case, you'll share your screen with Regex Hero open as we dive into it.  &lt;a href="mailto:steve@bucketsoft.com?subject=Skype screen sharing"&gt;Email me&lt;/a&gt; if you're interested and we'll set up a time.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;What you'll need...&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.skype.com/intl/en-us/get-skype/" target="_blank"&gt;Skype 4.0 or greater&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Speakers and a microphone, or a headset&lt;/li&gt;
&lt;li&gt;A computer capable of running &lt;a href="http://regexhero.net/tester/" target="_blank"&gt;Regex Hero&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=9fwmc3hae2c:90hUjBos_0M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=9fwmc3hae2c:90hUjBos_0M:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=9fwmc3hae2c:90hUjBos_0M:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/9fwmc3hae2c" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/9fwmc3hae2c/skype-screen-sharing-with-steve.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-Hg73xTXKt60/TkGZ3BC2C_I/AAAAAAAAAVc/JzwTg66J7K8/s72-c/skype_logo.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/08/skype-screen-sharing-with-steve.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-720038979693206252</guid><pubDate>Sun, 12 Jun 2011 19:52:00 +0000</pubDate><atom:updated>2012-04-02T09:20:43.416-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><category domain="http://www.blogger.com/atom/ns#">Development / Technical</category><title>Bug fixes around undo/redo and copy/paste</title><description>I found a report of a case recently where &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; would sporadically cause Chrome to crash.  It was in a comment on StackOverflow, and I'm lucky to have found it.  I didn't have much to go on, but I take reports like this seriously.&lt;br /&gt;
&lt;br /&gt;
First of all, I had never seen this actually happen before.  But I began by banging on things trying to make anything and everything break that I possibly could.  My method is perhaps a bit crude and it simply takes time and some knowledge of what's going on in the code to get anywhere.&lt;br /&gt;
&lt;br /&gt;
Here's what I managed to fix, in order of discovery:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;There was a layout problem involving the minimum vertical height of Regex Hero.  After you shrink the window beyond a certain point a scroll bar appears so as not to fold the UI on top of itself.  Well there was a logic problem in this calculation which could actually throw an error in certain circumstances.  The error was being trapped though, and couldn't have caused the crash.  &lt;/li&gt;
&lt;li&gt;The expand/collapse options button along the right hand side of the app had an unusual bug where, after clicking, the tooltip would be reused for other UI elements.  I fixed it by using just one button rather than hiding/showing two different ones.  Again, this was a weird bug but not one that could've caused the crash.&lt;/li&gt;
&lt;li&gt;Whenever you right click text and choose Cut/Copy/Paste, Regex Hero accesses the clipboard programmatically.  On first use, this will throw a security warning from Silverlight (there's no way around that).  The trouble is that if you choose not to allow Regex Hero access to the clipboard, Regex Hero would kind of fall on its face and not handle that condition gracefully.  Again, an exception would be thrown, but it was caught and couldn't have caused anything to crash.  I improved this process a bit and I now provide a follow up dialog.&lt;/li&gt;
&lt;li&gt;I took a couple days and came back to this.  And just yesterday I finally reproduced the problem.  The problem, it turns out, comes from another bug in the RichTextBox. And it's not isolated to Chrome.  The same behavior occurs in IE9.  Regex Hero was programmatically replacing line feeds with carriage returns when loading your previously stored text from isolated storage.  I do this to ensure consistent behavior within the app.  A separate string variable assigned to the text value of each textbox is then reshaped as necessary depending on if you have the CrLf option checked within Regex Hero.  However, if you have more than 10 lines of text, then cut the top 9, then hit undo, the built-in undo functionality fails.  The RichTextBox undo system seems to have a serious problem with carriage returns.  It can't seem to fully restore from its history, only actually rendering 3 lines of text.  The rendering pipeline then seems to be out of sync with what the text value actually equals.  It's odd.  And it causes Silverlight to freeze, sometimes bringing the whole browser down.  I'm reporting this to Microsoft.  My solution is to now replace all carriage returns with line feeds instead.  Behind the scenes we have the same effect and the app works as it should, but it effectively avoids this bug.&lt;/li&gt;
&lt;/ol&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=Er17sJygNeY:gqNHSZ4lu0s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=Er17sJygNeY:gqNHSZ4lu0s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=Er17sJygNeY:gqNHSZ4lu0s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/Er17sJygNeY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/Er17sJygNeY/bug-fixes-around-undoredo-and-copypaste.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/06/bug-fixes-around-undoredo-and-copypaste.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3156183736530488401</guid><pubDate>Sat, 30 Apr 2011 18:04:00 +0000</pubDate><atom:updated>2012-04-02T09:23:34.833-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Bug fixes concerning tabs and syntax highlighting</title><description>&lt;b&gt;The tab spacing bug&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This problem stems from a bug in the RichTextBox.  Basically, the tab spacing in the RichTextBox is inconsistent and very strange.  Sometimes a tab will be bigger than a space, and sometimes it'll be smaller than a space.  I have &lt;a href="http://forums.silverlight.net/forums/p/226908/550744.aspx#550744"&gt;informed Microsoft of the bug&lt;/a&gt; and I'm hoping they'll fix it for Silverlight 5.  &lt;br /&gt;
&lt;br /&gt;
What this means for &lt;a href="http://regexhero.net/"&gt;Regex Hero&lt;/a&gt; is that tabs would throw the highlighting out of alignment.  So my fix was to override tabs with spaces.  I had made this change weeks ago.  But today's release has this same treatment on &lt;a href="http://getsatisfaction.com/bucketsoft/topics/the_realtime_highlight_feature_is_off_when_pasting_tabbed_text"&gt;pasting tabbed text&lt;/a&gt;.  &lt;br /&gt;
&lt;br /&gt;
This isn't ideal and basically means the \t regular expression will never match anything in Regex Hero.  If I can find a better workaround I will do it.  But at least today's fix means that the yellow highlighting will always be in alignment and is reliable again.&lt;br /&gt;
&lt;br /&gt;
To help ensure Microsoft fixes this bug in the RichTextBox in a timely manner, you can help by  &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/666211/silverlight-4-richtextboxs-inconsistent-tab-spacing"&gt;up-voting the bug here on MS Connect&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Syntax highlighting&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The syntax highlighter had a minor bug with back slashes.  The following regular expressions are valid, but the syntax highlighter was painting them red...&lt;br /&gt;
&lt;br /&gt;
&lt;div style="color: red"&gt;(abc\\)&lt;/div&gt;&lt;div style="color: red"&gt;[abc\\]&lt;/div&gt;&lt;br /&gt;
It was seeing the \ before the ending parenthesis, escaping the parenthesis, and then thinking that these constructs were not closed.  It didn't look far enough back to see the \\.  So I fixed the bug, and now it works properly.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=vd5-xN6ZnBU:o4lM1jkt4GM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=vd5-xN6ZnBU:o4lM1jkt4GM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=vd5-xN6ZnBU:o4lM1jkt4GM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/vd5-xN6ZnBU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/vd5-xN6ZnBU/bug-fixes-concerning-tabs-and-syntax.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/04/bug-fixes-concerning-tabs-and-syntax.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3469072323975618473</guid><pubDate>Sun, 06 Mar 2011 05:18:00 +0000</pubDate><atom:updated>2011-03-05T22:25:02.096-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Release Announcements</category><title>Syntax Highlighting</title><description>&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://regexhero.net/tester/" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="183" src="https://lh5.googleusercontent.com/-3v_FDS7h-UA/TXMXQ6Ea2mI/AAAAAAAAAR0/uAHZQNfmoHs/s320/syntax-highlighting.PNG" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Syntax Highlighting&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;This feature was requested back in 2009.  I didn't do it back then because I wasn't sure how I was going to do everything I wanted with it. Ever since the beginning I've always said that if I can't implement a feature right, then I wouldn't bother with it.&lt;br /&gt;
&lt;br /&gt;
But I've learned since then and this week I gave it a try. &amp;nbsp;It took a little experimenting to find the right approach, but I'm pleased with the end result.&lt;br /&gt;
&lt;br /&gt;
The syntax highlighter is built off of my existing parsing engine. In addition to highlighting basic constructs, it'll also detect unclosed parenthesis or brackets and paint them red.  So for example &lt;span style="color: red;"&gt;(abc(def)&lt;/span&gt; would all be red. &amp;nbsp;I think this makes it easier to find mistakes. And I hope you enjoy it.&lt;br /&gt;
&lt;br /&gt;
In addition to this I've fixed a few bugs and made a few improvements:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;I improved code completion when working with a multi-line regular expression.  The down arrow key now responds more like you'd expect a good code completion system would.&lt;/li&gt;
&lt;li&gt;I optimized some initialization code and sped up the app slightly.&lt;/li&gt;
&lt;li&gt;I was able to remove an unneeded assembly. &amp;nbsp;The app is now about 40KB smaller.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=rhGN6suh6hY:QQ4layvgwgU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=rhGN6suh6hY:QQ4layvgwgU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=rhGN6suh6hY:QQ4layvgwgU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/rhGN6suh6hY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/rhGN6suh6hY/syntax-highlighting.html</link><author>noreply@blogger.com (Steve Wortham)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://lh5.googleusercontent.com/-3v_FDS7h-UA/TXMXQ6Ea2mI/AAAAAAAAAR0/uAHZQNfmoHs/s72-c/syntax-highlighting.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/03/syntax-highlighting.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8044172762034419597.post-3871252182397983159</guid><pubDate>Thu, 17 Feb 2011 15:33:00 +0000</pubDate><atom:updated>2011-02-17T08:33:54.908-07:00</atom:updated><title>Which Trial Experience Do You Prefer?</title><description>I've tried a couple different variations of trials over the past couple years. &amp;nbsp;But I've never asked you guys which you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;h2 class='title'&gt;Which Regex Hero trial experience do you prefer?&lt;/h2&gt;&lt;iframe allowtransparency='true' frameborder='0' height='280' name='poll-widget-8628772709023206932' src='http://www.google.com/reviews/polls/display/-8628772709023206932/blogger_template/run_app?txtclr=%23666666&amp;lnkclr=%235588aa&amp;chrtclr=%235588aa&amp;font=normal+normal+100%25+Georgia%2C+Serif&amp;hideq=true&amp;purl=http%3A%2F%2Fblog.regexhero.net%2F' style='border:none; width:100%;'&gt;&lt;/iframe&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=Zy9RU4PQ4Hk:ljtLlWXvUtk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/RegexHeroBlog?a=Zy9RU4PQ4Hk:ljtLlWXvUtk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/RegexHeroBlog?i=Zy9RU4PQ4Hk:ljtLlWXvUtk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RegexHeroBlog/~4/Zy9RU4PQ4Hk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RegexHeroBlog/~3/Zy9RU4PQ4Hk/which-trial-experience-do-you-prefer.html</link><author>noreply@blogger.com (Steve Wortham)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.regexhero.net/2011/02/which-trial-experience-do-you-prefer.html</feedburner:origLink></item></channel></rss>
