Browse by Tags

All Tags » Regular Expressions » CLR Internals (RSS)

Regex: MatchCollection uses delay matching for performance

There are several ways to get all of the matches of an expression over the source input, but the most popular probably has to be the Matches method which returns a MatchCollection . What most people don't know, and I didn't until recently, is that the...

Regex: Functionality about named/numbered groups everyone should know.

We have a cool new tool amongst us over on http://www.regexlib.com/RETester.aspx . It is already more functional than the previous tool there that was receiving quite a bit of traffic and attention for quickly testing expressions. The new tool really...

Generic, Cancellable, Asynchronous operations? Yeah, I'll blog about that.

Just code today my friends. The design is simple, create a framework that allows running an asynchronous delegate on the thread pool in a manner where it can be cancelled and any exceptions can be handled. We use the same BeginInvoke/EndInvoke model as...

Performance: Different methods for testing string input for numeric values...

So there was a blog entry about the VB .NET IsNumeric function today. The question was in regards to a C# equivalent. I have two things to say really. First, if you really want the IsNumeric function from VB you can always grab it out of Microsoft.VisualBasic...

The root of an InvalidProgramException and a possible JIT bug?

I recently posted about my experiences with extra long regular expressions in an attempt to clarify my recent performance analysis of alternation groups and trying to match an input pattern versus a large number of match possibilities. You can find my...

Making the Regex engine choke... Ever wanted to? I'll show you how...

Okay, so back in the pre-V1 days I made a humongous regular expression alternation group and wanted to precompile that guy for maximum speed. What exactly is a humongous regular expression? Well imagine 12000 or so words, each on average of 10 characters...

Want faster regular expressions? Maybe you should think about that IgnoreCase option...

Let me start with a disclaimer. RegexOptions.IgnoreCase is a very powerful option that allows you to match ignore character casing during matches irregardless of the currently running culture. In other words, this will allow you to take into account other...

Match vs MatchSparse, a regular expression implementation detail that may surprise you.

So out of the blue I printed the type of a Match, and found it wasn't a Match, but instead a MatchSparse. Okay, now I have to go look up the difference. It appears that a MatchSparse is created when you don't have sequentially ordered numeric capture...
More Posts