I am trying to use a regular expression that I validated in a pc program
(The Regex Coach) but is throwing an error when I try to us it on my
system. When the regcomp() process runs on the i5 I get the message: "?, *
or + not preceded by valid regular expression." The Regex Coach says it is
valid and is finding the strings I want it to.

The regex I am trying to use is:

^.*?CREDI(T ?)?L(I|Y)(NX|NK|NKS)((?!CAN|\bca\b).)*$

I think the i5 is not liking the last group ((?!CAN... because when I
remove it I don't get the error.

Ultimately this is what I want:
CREDITLINX ANYTHING <= VALID
CREDITLINX CA ANYTHING <= NOT VALID

Is there a reference somewhere that I can find out what expressions are
valid on my system?

I'm on v5r4.

cflags = REG_EXTENDED + REG_ICASE + REG_NOSUB;
rc=regcomp(preg:RegexString:cflags);

Matt Hopkins
Sr. Programmer/Analyst
Web: www.pdpgroupinc.com
Email: MWHopkins@xxxxxxxxxxxxxxx
Office: 410-584-0330
Fax: 410-584-0336
Cell: 410-258-8845


The information contained in this communication may be confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message and any copy of it from your computer system. Thank you.

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.