Henry Boehlert


Is there a .NET compliant, yet stream-based regex-implementation available

The regex implementation in System.Text.RegularExpression is very useful and I use it regularly.

However, more often than not (e.g. today) I find myself reading an entire file or buffering a chunk of streamed data, just to capture some comparably small pieces of information.

If there was an Regex implementation based on Stream/TextReader, using events to convey group captures, I could reduce the memory needed for the buffering as well as the time and I/O to read data beyond my area of interest.

Searching the community I found no mention of such a thing.

I understand that backtracking and the like would still require buffering or pose restrictions on either the usable Stream or available regex language elements.

However, I would find a SAX-like regex implementation incredibly useful.

Would anybody disagree

Re: Regular Expressions Regex on Stream


If you are still passionate about the idea...post the it to Microsoft Connect as a suggestion. If it is something they are working on, they will let you know, otherwise it will be evaluated. If you post let us know, each issue can be voted on by the community to bring it awareness. Others reading this post with similar issues may vote with you. Thanks.

Re: Regular Expressions Regex on Stream


I second this feature request.