TRE – The Approximate Regular Expression Library
Regular expressions are an incredibly powerful tool for informatics in spite of their fairly steep learning curve. Regular expressions are a series of special characters that are used to describe a larger pattern that it aspires to match against. There are many useful tools for learning and integrating regular expressions into your code. In particular, we have stumbled upon a library called TRE which allows us to incorporate “fuzzy” matching regular expressions into our workflows. We can now use non-exact patterns for use parsing information from files – and therefore build more flexible scripts and search algorithms. This library is also utilized in the command line tool agrep – a version of the command grep which is a unix searching tool for quickly and easily getting information from a file or tool. Agrep uses the library to do approximate matching instead of exact, expanding the possibilities and usefulness of the grep tool. Check out the library’s documentation and source code on Github at the link below.