Skip to main content
Question

How to do REGEXP in SQLCreator transformer on a SQLite database

  • December 2, 2019
  • 1 reply
  • 61 views

gabriel_hirsch
Contributor
Forum|alt.badge.img+12

I have a SQLite database (version 3, created in FME) that I want to use a Select statement with a regular expression in the SQLCreator transformer. According to the SQLite documentation the regexp() user function is a special one that need to be defined. Does anyone know a easy way to do this in FME? (it have to work in both PC and Mac environment)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • 8394 replies
  • December 2, 2019

I was a bit too quick to answer, not realizing that the REGEXP reserved word doesn't work out-of-the-box in SQLite3. So basically you need to provide some precompiled library (e.g. pcre.so for Linux) that is platform-dependent. Unfortunately I have the impression that there are no official repositories or distributors of such libraries.

I've googled around quite a bit but was unable to find any such libraries for Windows, only for Linux (which might possibly work on a Mac, if you're lucky).

What exactly is the use case for REGEXP in the database? Is there perhaps another way to accomplish the same thing?