Gert Van Assche <[email protected]> wrote:
> I read in the documentation  "The REGEXP operator is a special syntax for
> the regexp() user function. No regexp() user function is defined by default
> and so use of the REGEXP operator will normally result in an error message.
> If a application-defined SQL
> function<http://www.sqlite.org/c3ref/create_function.html>named
> "regexp" is added at run-time, that function will be called in order
> to implement the REGEXP operator."
> 
> I don't know how to act on this. What should I do to include a regular
> expression in an SQL query.

You should write and install a user-defined function named "regexp" taking two 
parameters - a string to match and a pattern to match it against - and 
returning a non-zero integer if the string matches the pattern and zero 
otherwise. Once this is done, you can write queries like

select * from myTable where myField regexp 'myPattern';

-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to