Douglas, looks like you got this working over in the COBOL group, nice: https://community.ibm.com/community/user/question/using-enterprise-cobol-to-call-c-regcomp-regex-functions. Dropping the link here for anyone who lands on this thread later. Short version of what fixed it: pass the fullword arguments BY VALUE, use null terminated z'...' literals (or append x'00' yourself), and set the locale with CEESETL so it matches the codepage your source was compiled with. Otherwise characters like $ and [ don't mean what the regex engine thinks they mean. Frank's and Denis's sample programs in that thread are a great starting point.