"rlee0001" <robeddielee(at)hotmail(dot)com> writes:
> My problem is with SUBSTRING. When it fails to find a match for the
> regexp pattern within the source string it returns NULL. Why?!
Because the SQL standard says so.
Of course, you're free to wrap the built-in function in your own
function that has behavior you like better for this case...
regards, tom lane