I have the following working function which is used in check constraint (I\'ll only post the relevant SQL part):
-- a comma should always be followed by a s