My C is practically nil, but I believe that just returns a true/false whether the pattern matches.
From the Db2 reference:
The REGEXP_INSTR returns the starting position or the position after the end of
the matched substring, depending on the value of the return_option argument.
The REGEXP_REPLACE function returns a modified version of the source string
where occurrences of the regular expression pattern found in the source string are
replaced with the specified replacement string.
The REGEXP_SUBSTR function returns one occurrence of a substring of a string
that matches the regular expression pattern.
Thanks
-----Original Message-----
From: David Gibbs [mailto:david@xxxxxxxxxxxx]
Sent: Wednesday, February 07, 2018 1:14 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: Regex INSTR, REPLACE, SUBSTRING
On 2/7/2018 12:04 PM, Justin Taylor wrote:
Obviously you can't use SQL functions without SQL. My question is
whether than are non-SQL equivalents?
You can use the C API's.
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rtref/regexec.htm
I suspect they are harder to use then the SQL functions.
david
--
David Gibbs
midrange.com
IBM i on Power Systems: For when you can't afford to be out of business!
I'm riding 615 miles (Yes, you read that right) in the American Diabetes Association's Tour de Cure to raise money for diabetes research, education, advocacy, and awareness. You can make a tax deductible donation to my ride by visiting
https://list.diabetessucks.net.
See where I get my donations from ... visit
https://lsteml.diabetessucks.net/map for an interactive map (it's a geeky thing).
I may have diabetes, but diabetes doesn't have me!
As an Amazon Associate we earn from qualifying purchases.