Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jacob Salomon — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi again, Family.
I am rereading up on SPL (which I have not touched in nearly 30 years - and the times, they are a-changin'!) because I found a user request for an interesting constraint on a column in a table.
It must look like an email address i.e.
yodel@spaceballs.org
. (or maybe
yodel@spaceballs.org.en
for a British email address.)
It may contain several email addresses, separated by a semicolon.
But a maximum of 3 email addresses.
I don't believe there is any MATCHES or LIKE expression in SQL that would work for such a complex requirement. I might conceive of a regular expression in Perl that might handle this but for a
check constraint
? Well, for a complex check like this I suppose we'd go to stored procedure invoked in the AFTER clause of the trigger. But is such detailed character manipulation even possible in SPL? My instincts leads me to an external procedure/function but written in Perl. But I'm mainly curious if it is possible in SPL.
Ideas, anyone?
------------------------------
Jacob Salomon
---
Nobody goes there anymore, it's too crowded. --Attr: Yogi Berra
------------------------------
↪ replying to Jacob Salomon
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
Use the regex blade
On 3/27/2025 3:53 PM, Jacob Salomon via IBM TechXchange Community wrote:
01000195d96192f6-8be75281-8189-4a55-ace8-07d01d6c1d2b-000000@email.amazonses.com">
Hi again, Family. I am rereading up on SPL (which I have not touched in nearly 30 years - and the times, they are a-changin'!) because I found a...
↪ replying to Paul Watson
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
the older version can be downloaded from here (with source code). It has the same functionality as the official one for most part
https://www.oninit.com/download/index.php?page=regexp.html
On 3/27/2025 3:56 PM, Paul Watson via IBM TechXchange Community wrote:
01000195d964150c-2558b948-39de-466b-bc5d-a7c0d1fcaf3b-000000@email.amazonses.com">
Use the regex blade On 3/27/2025 3:53 PM, Jacob Salomon via IBM TechXchange Community wrote: ... -posted to the "Informix" group
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.