tre-library

Finding multiple regex hits using approximate matching via the tre library

Using C, I'm trying to find the location and number of matches of a substring within another parent string. Because I also need to include approximate (hamming distance) matches, I'm using the tre library found here: http://laurikari.net/tre/. I'm having trouble understanding some of the documentation on the site, likely because I'm no...

Fuzzy Regular Expressions

In my work I have with great results used approximate string matching algorithms such as Damerau–Levenshtein distance to make my code less vulnerable to spelling mistakes. Now I have a need to match strings against simple regular expressions such TV Schedule for \d\d (Jan|Feb|Mar|...). This means that the string TV Schedule for 10 Jan s...

Loading c libraries from php

Hi, in a recent project I've come really need the lib tre matching library. However the project is in php, and there are no php bindings for the library. I've tried to google how to create an interface for c libs, but all I found was the dl function which seams to load only php extensions. What am I missing? ...