|
Trying to use regular expressions in RPGLE.
Have the following:
string = 'Some stuff A410920 other stuff' + x'00';
in@pattern = '[AaZz]{1}[Aa0-9]{1}\d{5,6}' + x'00';
preg = %addr(regex_t);
pmatch = %addr(regmatch_t);
// Compile RE
rc=regcomp(preg:%addr(in@Pattern):REG_EXTENDED);
// Execute RE
rc = regexec(preg: %addr(string):
nmatch: pmatch: 0);
I am trying to match/find A410920 in the string.
In this case - it does not find a match: If I put this same example in
one of the web based regular expression testers - It matches fine.
If I change the in@pattern to '[AaZz]{1}[Aa0-9]{1}' + x'00';
it will match the A4 portion of the string.
Can't seem to figure out what is wrong. Any help would be appreciated.
Thanks
Terry L. Bullard
Application Development Consultant
The Goodyear Tire & Rubber Company
6650 Ramsey Street, Fayetteville, NC 28311
phone.910.630.5644
terry_bullard@xxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
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.