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



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).)*$

First off, I would drop the beginning three characters ^.* since the
statement executes the same with and without them. (You are saying, "Anchor
to the beginning of the line, then skip as many as necessary until you
find..." The regex will do that anyway if you don't anchor.)

That leaves you with an expression that starts with a question mark. The
question mark meaning is "Zero or more of the PRECEDING element. (not meant
as a shout.) There is no preceding element. After that I see several other
similar uses of ? and I'm fairly certain you're misunderstanding that
purpose. You might want to start with the wiki on the topic, which is
pretty easy to read and understand.
http://en.wikipedia.org/wiki/Regular_expression.

I think you don't want us to write the expression so I will leave you with
that and offer my help with questions.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I found your essay to be good and original. However, the part that was
original was not good and the part that was good was not original."
-- Samuel Johnson






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.