user152949
user152949

Reputation:

How to implement Regex

I'm working on a database server software product (see my profile) and we see the need to implement free- text searching in our software. The query language standard we are using only supports free-text search using a BT type Regex. The only way we can use our free-text database indexes together with Regex seems to be to implement our own. My questions to SO is:

Upvotes: 3

Views: 740

Answers (2)

user152949
user152949

Reputation:

There are two papers I have found on the subject on REGEX indexing online; one from Bell Labs and one from UCLA/IBM. I'm still not sure if to use an existing Regex library and modify it or write one from scratch.

Upvotes: 1

Sebastian Cabot
Sebastian Cabot

Reputation: 1822

If I'm not wrong SPARQL uses the XPath/XQuery regular expression syntax which is based on PERL regular expressions (At least that is what the W3C docs say)

If this is indeed the case then you can use PCRE from http://www.pcre.org/

It is licensed as BSD so you will be able to use it in a commercial product

If your syntax is slightly modified you can probably write a small routine to normalize it to the PERL syntax used by PCRE

Upvotes: 2

Related Questions