Check the Does MonetDB support regular expression predicates?
The implementation is there in the MonetDB backend, the module that
implements it is pcre (to be found in MonetDB5 source tree).
I'm not sure whether it is available by default from MonetDB/SQL.
If not, with these two function definition, you link SQL functions to the
respective implementations in MonetDB5:
-- case sensitive
create function pcre_match(s string, pattern string)
returns BOOLEAN
external name pcre.match;
-- case insensitive
create function pcre_imatch(s string, pattern string)
returns BOOLEAN
external name pcre.imatch;
If you need more, I'd suggest to have a look at MonetDB5/src/modules/mal/
pcre.mx in the source code.
Use select name from sys.functions;
to check if the function exists, otherwise you will need to create it.
As an example, you may use pcre_imatch()
like this:
SELECT mystring FROM mytable WHERE pcre_imatch(mystring, 'myexpression');
select name from sys.functions;
to check if the function exists, otherwise you will need to create it.<br/> Matching Viktor's example of function ` pcre_imatch(), the syntax of using it (in my original question) would be <br/>
SELECT mystring FROM mytable WHERE pcre_imatch(mystring, 'myexpression');` – airan