Some regular expression libraries

While I’m on the lookout for small libraries anyway, I thought I’d also post a list of a few regular expression libraries I’ve found recently (again, for possible use in an embedded Linux system).

So if you need a small or medium sized regex library for one of your projects, here’s a start:

Being a bloat despiser myself, I love the idea of using just 15KB of source code to handle your regexen. If you need something more powerful, however, TRE does look very good. Somehow reminds me of TCC (Tiny C Compiler).

27 February 2009 by Ben    5 comments

5 comments (oldest first)

herry 29 Nov 2010, 19:47 link

Good post….thanks for sharing.. very useful for me, I will

bookmark this for my future needs.

Robert 15 Jul 2011, 01:12 link

Thank you for the link to SLRE. I just dropped the header file and single c file into my src directory and it compiled with no problems, I didn’t even have to change my Makefile.

I am trying to convert my website to use ‘c’ cgi and want to use regular expressions but found that other regexp libraries more than doubled the final executable size!

developer 10 Sep 2012, 23:33 link

I used T-Rex, it has some nasty bugs, dropped it.

luke 25 Oct 2012, 04:59 link

Nice list – it was very helpful! You might want to add GRETA as well.

phat 15 Aug 2014, 20:35 link

T-Rex can’t solve regexp like a?a correctly. Its ‘invalid range’ is wrong, too.

Add a comment

We reserve the right to edit or remove your comment if it’s spammy, offensive, unintelligible, or if you don’t give a valid email address. :-)

We’ll never share your email address.