Tuesday, April 18, 2006
« Windows Tips and Tricks | Main | Internet Explorer 7 Beta 2 Annoyances »

Here is the link to everything I used in the talk - PowerPoint, *.express files, and source code: MUNG_RegEx Talk.zip (34.5 KB)

The RegexOptions.Compiled flag

Something I forgot to mention in the talk is the "RegexOptions.Compiled" flag.  If you are going to execute the exact same regular expression repeatedly, you can use this flag in addition to any other flags you may have specified (e.g. RegexOptions.IgnorePatternWhitespace).  This will cause the framework to dynamically compile the expression to IL instead of using RegEx op codes, and therefore dramatically increase performance. 

If you are dynamically creating regular expressions, do NOT use the "Compiled" flag.  Each unique compiled RegEx is kept in memory until the application quits - even if the RegEx object goes out of scope. 

Resources:

 

[Update] Fixed error in .express file

Tuesday, April 18, 2006 3:44:59 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Related posts:
Speaking at CodeStock 2009 – Regular Expressions
MNUG – Introduction to Silverlight 2 – October 23, 2008
Nikhil Kothari's Web Development Helper
RegEx AND code is good
Developer Resources Update
Managed Memory Leaks
Tracked by:
"Developer Tools and Resources" (Colin Neller) [Trackback]
http://www.colinneller.com/blog/DeveloperToolsAndResources.aspx [Pingback]
"austriapillstore.com" (austriapillstore.com) [Trackback]
"chhabraracing.com" (chhabraracing.com) [Trackback]
"compressorasia.com" (compressorasia.com) [Trackback]
"chhabrafamilyfoundation.net" (chhabrafamilyfoundation.net) [Trackback]
"chhabragroup.com" (chhabragroup.com) [Trackback]
"cobestore.com" (cobestore.com) [Trackback]
"coffeebeenery.com" (coffeebeenery.com) [Trackback]
"cleverdollars.com" (cleverdollars.com) [Trackback]
"slightly-morbid.net" (slightly-morbid.net) [Trackback]
"specsites.com" (specsites.com) [Trackback]
"chhabramedicalgroup.com" (chhabramedicalgroup.com) [Trackback]
"monstarstudios.com" (monstarstudios.com) [Trackback]
"chhabrafamilyfoundation.net" (chhabrafamilyfoundation.net) [Trackback]
"buyitnowdvd.com" (buyitnowdvd.com) [Trackback]
"chhabranetwork.com" (chhabranetwork.com) [Trackback]
"collegepridepixels.com" (collegepridepixels.com) [Trackback]
"brooksgenerationsinvestment.com" (brooksgenerationsinvestment.com) [Trackback]
"twincircles.com" (twincircles.com) [Trackback]
"slightly-morbid.net" (slightly-morbid.net) [Trackback]
"biocroc.com" (biocroc.com) [Trackback]
"collegepridepixels.com" (collegepridepixels.com) [Trackback]
"comeworldwide.com" (comeworldwide.com) [Trackback]
"chhabrahomes.com" (chhabrahomes.com) [Trackback]
"chhabramediagroup.com" (chhabramediagroup.com) [Trackback]
"cobeebooks.com" (cobeebooks.com) [Trackback]
"chhabramedicalgroup.com" (chhabramedicalgroup.com) [Trackback]
"bunkeredpb.com" (bunkeredpb.com) [Trackback]
"moosealleyinn.com" (moosealleyinn.com) [Trackback]
"chhabraproducts.com" (chhabraproducts.com) [Trackback]
"putitinwriting.net" (putitinwriting.net) [Trackback]
"click2usa.com" (click2usa.com) [Trackback]
"biocroc.com" (biocroc.com) [Trackback]
"wa7ah.net" (wa7ah.net) [Trackback]
"darkfusiondesigns.com" (darkfusiondesigns.com) [Trackback]
"click2usa.com" (click2usa.com) [Trackback]
"arizonagreathomes.com" (arizonagreathomes.com) [Trackback]
"musicdocks.com" (musicdocks.com) [Trackback]
"projectxena.com" (projectxena.com) [Trackback]
"bubonic-plague.com" (bubonic-plague.com) [Trackback]
"internet-marketingpro.com" (internet-marketingpro.com) [Trackback]
"wysiwygkennels.com" (wysiwygkennels.com) [Trackback]
"elite-stfu.com" (elite-stfu.com) [Trackback]
"viscofoambeds.com" (viscofoambeds.com) [Trackback]
"joysox.com" (joysox.com) [Trackback]
"imagineitsystems.com" (imagineitsystems.com) [Trackback]
"catscratches.net" (catscratches.net) [Trackback]
"aliesworld.com" (aliesworld.com) [Trackback]
"esuite2.com" (esuite2.com) [Trackback]
"imagineitplanet.com" (imagineitplanet.com) [Trackback]
"skumbre.com" (skumbre.com) [Trackback]
"fecklessband.com" (fecklessband.com) [Trackback]
"esuite1.com" (esuite1.com) [Trackback]
"gps-sources.com" (gps-sources.com) [Trackback]
"thehostingwizard.com" (thehostingwizard.com) [Trackback]
"icebirdair.com" (icebirdair.com) [Trackback]
"urbanpokerworld.com" (urbanpokerworld.com) [Trackback]
"top-ballaz.com" (top-ballaz.com) [Trackback]
"chronic-farm.com" (chronic-farm.com) [Trackback]
"planetfeelgood.com" (planetfeelgood.com) [Trackback]
"941radio.com" (941radio.com) [Trackback]
"allwhatuneedonline.com" (allwhatuneedonline.com) [Trackback]
"esuite3.com" (esuite3.com) [Trackback]
"azuu.com" (azuu.com) [Trackback]
"posters-sources.com" (posters-sources.com) [Trackback]
"corkbooksbyceline.com" (corkbooksbyceline.com) [Trackback]
"shadyinternational.com" (shadyinternational.com) [Trackback]
"omtecproducts.com" (omtecproducts.com) [Trackback]
"mates4eva.com" (mates4eva.com) [Trackback]
"linens-sources.com" (linens-sources.com) [Trackback]
"skateboard-sources.com" (skateboard-sources.com) [Trackback]
"affware.com" (affware.com) [Trackback]
"eckoclients.com" (eckoclients.com) [Trackback]
"eugenedoney.com" (eugenedoney.com) [Trackback]
"made4trucks.com" (made4trucks.com) [Trackback]
"pciiusa.com" (pciiusa.com) [Trackback]
"simpletouchgroup.com" (simpletouchgroup.com) [Trackback]
"kpcpalmsprings.com" (kpcpalmsprings.com) [Trackback]
"amkinvest.com" (amkinvest.com) [Trackback]
"blueeyedboyproductions.com" (blueeyedboyproductions.com) [Trackback]
"xcolumn.net" (xcolumn.net) [Trackback]
"submitsteps.com" (submitsteps.com) [Trackback]
"doctorsanders.com" (doctorsanders.com) [Trackback]
"errom.net" (errom.net) [Trackback]
"grymm.net" (grymm.net) [Trackback]
"culosdiarios.com" (culosdiarios.com) [Trackback]
"citysearchyellowpages.com" (citysearchyellowpages.com) [Trackback]
"soccerterra.com" (soccerterra.com) [Trackback]
"spainpillstore.com" (spainpillstore.com) [Trackback]
"diamoniquedeal.com" (diamoniquedeal.com) [Trackback]
"jkaspecialties.com" (jkaspecialties.com) [Trackback]
"smartpagesyellowpages.com" (smartpagesyellowpages.com) [Trackback]
"cheapsubjects.com" (cheapsubjects.com) [Trackback]
"2015pokerfinals.com" (2015pokerfinals.com) [Trackback]
"buysubjects.com" (buysubjects.com) [Trackback]
"sweetdealsonwheels.com" (sweetdealsonwheels.com) [Trackback]
"thecatpage.com" (thecatpage.com) [Trackback]
"swamitra.net" (swamitra.net) [Trackback]
"tongverb.net" (tongverb.net) [Trackback]
"yemencastle.com" (yemencastle.com) [Trackback]
"itconsulta.net" (itconsulta.net) [Trackback]
"ipowercard.net" (ipowercard.net) [Trackback]
"wnsgam.com" (wnsgam.com) [Trackback]
"free815.com" (free815.com) [Trackback]
"support-client.com" (support-client.com) [Trackback]
"whitesspace.com" (whitesspace.com) [Trackback]
"marijuanaseedsbanks.com" (marijuanaseedsbanks.com) [Trackback]
"purple-icing.com" (purple-icing.com) [Trackback]
"http://9nx-information.info/71964213/index.html" (http://9nx-information.info/7... [Pingback]
"http://9ma-free-porn.info/56698580/index.html" (http://9ma-free-porn.info/56698... [Pingback]
"http://9ns-information.info/62410314/sewimg-lights.html" (http://9ns-informatio... [Pingback]
"http://9ng-information.info/05072551/index.html" (http://9ng-information.info/0... [Pingback]
"http://9mf-free-porn.info/02488801/index.html" (http://9mf-free-porn.info/02488... [Pingback]
"http://9mb-free-porn.info/39343052/pictures-of-post-polio-syndrome.html" (http:... [Pingback]

Wednesday, April 19, 2006 7:30:30 AM (Central Standard Time, UTC-06:00)
Good summary on regular expressions. I'll have to look into the back-referencing some more.

One thing - I tried pulling up the quotes.express file and it was missing a > at the end (i.e. "(?<quote>['"]).*?\k<quote" instead of "(?<quote>['"]).*?\k<quote)" ).
Monday, April 24, 2006 3:17:26 PM (Central Standard Time, UTC-06:00)
Interesting... thanks for the heads up. One thing that I did say about "The Regulator" at the talk was that it is a bit buggy (though still extremely helpful.) I've noticed that saving files can be particularly flakey.
Wednesday, May 17, 2006 11:47:59 AM (Central Standard Time, UTC-06:00)
Got it fixed
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):