← Back to team overview

maria-developers team mailing list archive

Re: Documentation for old regex library calls

 

Hi, Sudheera!

On Jul 21, Sudheera Palihakkara wrote:
> Hi all,
> 
> I'm replacing the current regular expression library with modern
> library(pcre) for mariadb. I need some information about the ways that code
> uses the old regex library. The relevant codes are in sql/item_cmpfunc.cc
> directory. For exapmle in the function : int Item_func_regex::regcomp(bool
> send_error) I can't understand most of the lines, and the code is not
> well-commented. In the new library(pcre) uses different way to compile a
> regEx so I have to understand this and code for pcre preserving the
> functionalists of the class. Is there any documentation for this file or
> the way they used to work with old regex library ? thanks.

This class uses four functions of our old regex library - my_regcomp(),
my_regerror(), my_regexec(), my_regfree().

If you remove the "my_" prefix, you can google them out, regcomp,
regerror, regexec, regfree - they're all pretty standard.

I presume pcre has something similar.

Regards,
Sergei


Follow ups

References