How .NET Regular Expressions Really Work(moserware.com)
moserware.com
How .NET Regular Expressions Really Work
http://www.moserware.com/2009/03/how-net-regular-expressions-really-work.html
4 comments
I believe that's the reason that the Mono project specifically disallows contributions from anyone who has laid eyes on any of the .Net source code, although it's still a somewhat gray area AFAIK.
I had always suspected that regular expressions were not, in fact, regular, and now it is obvious.
This is in fact why regexs are slow. The old Thompson NFA is orders of magnitude faster than current libraries. However, it can only recognize regular languages.
I wonder, are there any libraries for CFG's, that allow specifying the productions?
This is in fact why regexs are slow. The old Thompson NFA is orders of magnitude faster than current libraries. However, it can only recognize regular languages.
I wonder, are there any libraries for CFG's, that allow specifying the productions?
Flex and Bison come to mind, but they are tailored more for the point of generating new language parsers and compilers. You could, however, attempt to use them in another fashion, considering they are open source (BSDish and GPL respectively).
Although I have looked, I've been unable to find much more than a bunch of whitepapers and various incomplete projects.
Although I have looked, I've been unable to find much more than a bunch of whitepapers and various incomplete projects.
it was refreshing to see that the .NET regular expression engine was written entirely in C#
Pretty awesome that he can do this sort of digging in his language of choice.
Pretty awesome that he can do this sort of digging in his language of choice.
This is a great article! Thanks for taking the time to write it.
This is just a random thought that I'm curious about. I'm not trying to troll the topic.