× 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.



I had better luck using stackoverflow :
http://stackoverflow.com/questions/18404874/regex-replace-on-ibmi

So far, I had 2 replies :
First one, using Java :
The ILE C/C++ runtime library does not have a regex replace function available.
(http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rtref/sc41560702.htm)
(http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rtref/regexh.htm#regexh)

Java, however, has excellent support for regular expressions and integrates easily with RPGLE.

Introduction to Java and RPG
Using Regular Expressions in Java

Second one, using perl on pase :
The Young i Professionals Wiki has a page of Open Source Binaries. In the list is the PCRE Library (Perl Compatible Regular Expressions).
Let us know how this works out. I may try it myself ;-)
(http://www.youngiprofessionals.com/)
(http://www.youngiprofessionals.com/wiki/index.php/PASE/OpenSourceBinaries)
(http://www.pcre.org/)


-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Charles MARTIN
Envoyé : jeudi 22 août 2013 11:31
À : rpg400-l@xxxxxxxxxxxx
Objet : Regex Replace

Hello everyone,

Is there any way to do Regex Replace with RgpLe ?
I can do a Regex Validation, using the c++ function regexec() and call it from rpgle, but I need to do a regex replace.

Source : http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/index.jsp?topic=%2Frtref%2Fregexec.htm

Best Regards,




[https://www.mondialrelay.fr/img/logos/sign_outlook_fr.gif]



Charles MARTIN
Architecte Logiciel .Net




Courriel : cmartin@xxxxxxxxxxxxxxx
www.mondialrelay.fr <http://www.mondialrelay.fr/>

4 avenue antoine pinay

59510 Hem


[https://www.mondialrelay.fr/signatures/Handler.aspx?Type=Img&Pays=FR]<https://www.mondialrelay.fr/signatures/Handler.aspx?Type=Link&Pays=FR>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.