× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.