It's based on Dan Piponi's blogpost "Fast incremental regular expression matching with monoids" http://blog.sigfpe.com/2009/01/fast-incremental-regular-expression.html but expands Dan's ideas to include *locating* matches, matching multiple regular expressions at once, using a more compact datastructure than fingertrees, etc.
And - sorry - the implementation is in Java, for reasons explained in the article :)