|
I'm having trouble getting Regexec() to compile in my program. I'm using<snip>
the example regex_h that Scott put out a couple years ago.
The compiler error...<snip>
*RNF7542 30 001060 Parameter 4 is not valid as a parameter passed
by
reference.
*RNF7542 30 1 Parameter cannot be passed by reference when it can be
changed during the call.
Here is what I have...
d buffer s 1000a inz
d pattern s 512a inz('(?:\s+)(?:#)\s{0,5}([0-9a-z]+)')
d reg ds likeds(regex_t)
d numMatches s 10u 0 inz(100)
d matches ds likeds(regmatch_t) dim(100)
d rc s 10i 0
d len s 5u 0 inz
d foundWord s 100a inz
//Execute the regular expression to find pattern matches
rc = regexec(reg :%trim(buffer) :numMatches :matches :0);
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.