Friday, June 03, 2005

Regular Expression Library Builder

Regular Expression Library Builder

"Regular Expressions are an immensely powerful tool in a developer's arsenal and the flavour of regexs and the classes surrounding them that are available in the .NET Framework is, in my humble opinion, excellent. One of the most useful methods of all the methods available on all the types in the System.Text.RegularExpressions namespace is the static CompileToAssembly method of the Regex class.

The CompileToAssembly method allows you to compile a regex to a standalone assembly ...
...

The solution: a "Regular Expression Library". CompileToAssembly came to my rescue. I wrote a tool to quickly allow me to easily add multiple regular expressions to a "Regular Expression Library". I can create new libraries, load and modify existing ones, quickly add, remove, modify regular expressions and then redistribute the "Regular Expression Library" assembly via an auto-update to the application. The "parent" application can get new über-efficient regular expressions and continue working without any user intervention.
...

The RegexLibrary builder allows you to:
  • Create CLS compliant Regular Expression Libraries - A .NET assembly that contains only regular expressions

  • Add multiple regular expressions to a single assembly

  • Define individual names, namespaces, regex modifiers, and accessibility levels on a per regex basis

  • Reload existing Regular Expression Libraries and add, remove, or modify regular expressions contained within

  • Manually set the version number of the assembly to help ensure compatibility with existing versions

  • Much, much, more... ;-)

    • ..."


      Now that sounds pretty darn cool. I like the whole comple to assembly idea. I can see using it in just the way described above...

      Downloaded.

6 comments:

  1. Hey Greg,

    Thanks for posting about the tool. Let me know if you like it or if you need any improvements/bug fixes etc.

    Brian

    ReplyDelete
  2. THANK YOU for releasing it! :)

    ReplyDelete
  3. No Problem. I hope you find it useful. Let me know if you need any extra features or if you find any bugs in it.

    B

    ReplyDelete
  4. Thought you might be interested to know that I put up an article on CP about it after a few people contacted me and asked for it. Here's the link: http://www.codeproject.com/useritems/regexlibbuilder.asp

    ReplyDelete
  5. Thanks for the update...

    Actually I'm ahead of you. :)
    I say it on your blog and already posted about it yesterday, http://coolthingoftheday.blogspot.com/2005/06/regular-expression-library-builder-now.html

    The power of RSS feeds at work. :)

    ReplyDelete

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...