Free Regular Expression (Regex) Libraries and Source Code

Match Text Patterns the Concise and Efficient Way


Free Regular Expression (Regex) Pattern Matching Libraries and Source Code

Regular expression ("regex" for short) pattern matching is a concise and hopefully efficient way of specifying a piece of text for the purpose of searching for it or manipulating it in some way. It is often used in things like search and replace tools, text editors (for find and replace facilities), compiler construction, in a large number of programming languages (including, notably, Perl), etc.

The free libraries on this page allow you to include regex facilities in your programs without having to reimplement it from scratch. The libraries typically provide a set of functions or API that you can call to pass your regular expression and the string to use, and it will do the hard work for you. They are useful for people implementing text editors, command line shells, etc.

Incidentally, if you want to check your program's regular expressions handling (or even to just verify your own regex patterns) you can use one of the Free Interactive Regular Expression (Regex) Testers and Builders software around to compare the results.

Related Pages

Free Regular Expression (Regex) Libraries and Source Code

PCRE Library: Perl Compatible Regular Expressions

If you are familiar with the Perl regular expression syntax and semantics, the PCRE library will appeal to you. This library provides regex pattern matching in a Perl compatible way using both a native API as well as a set of wrapper functions that corresponds to the POSIX regular expression API. The library is distributed under the BSD licence.

Onigurama

Onigurama is a regular expressions library that allows you to specify a different character encoding for every regular expression object. It supports the GNU regex API, the POSIX regex API and the Onigurama native expressions. The library is licensed under the BSD licence and works under Unix-type systems (eg, Linux, Mac OS X, FreeBSD, etc) and Windows.

Boost C++ Libraries

The Boost C++ Libraries site is a source of "free peer-reviewed portable C++ source libraries" (quoted from the site). There are numerous libraries available, including libraries for regex matching (under "String and text processing"). With this library, it's possible to write your regular expression as a string or as an expression template, "which can refer to each other and themselves recursively with the power of context-free grammars".

Regular Expression Component Library

The Regular Expression Component Library uses a property-method-event architecture that works in Borland C++ Builder and Microsoft Visual C++ (see the Free C++ Compilers page for free official versions of the Microsoft and Borland compilers if you don't already have one).

regex

regex is a regular expression parser that is released into the public domain (or so the site says). It is useful if you want to write a program using regular expressions but don't want to use the GPL ones that come from the Free Software Foundation. (The package is somewhere in the middle of the page linked to; just scroll down to find it.)

Related Pages

Can't Find What You're Looking For?

Search the site using Google.

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free Regular Expression (Regex) Libraries and Source Code

 


 

thesitewizard.com: Free Webmaster Tutorials, Scripts and Articles

HowtoHaven.com: Free How-To Guides

thefreecountry.com: Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.