Little regex library

Git Repository

I made a small single-file regex matching library. I don't think that it's perfect yet (in terms of efficieny or structure), but it's small and has no dependencies.

It only has one public function, named regex, which tests to see if the string matches a regex pattern, starting from the beginning (as if it were prefixed with ^). If it matches, it returns the matched length, otherwise the function will return ((size_t) -1). Note that it matches greedily, so use accordingly.


Top of Page | Sitemap