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



Scott,

 Yup - that was it. Works great when compiled as 'extended'. Many thanks for
the explanation - I was concentrating on the syntax and didn't even think
about compiler options... 

JK

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, June 28, 2006 5:59 PM
To: Midrange Systems Technical Discussion
Subject: Re: regexec() trouble


Ooops... I have to correct one thing in my last post. You also have to
treat { and } differently in a BASIC regular expression. They need to bre
preceded by backslashes. So, if you want to use REG_BASIC, your pattern
has to look like this:

^[A-Z0-9._%-][A-Z0-9._%-]*@[A-Z0-9.-][A-Z0-9.-]*\.[A-Z]\{2,4\}$

I had forgotten about the backslashes in my previous post.

With an extended RE, you don't need to add the backslashes, and your
original pattern should work just fine.  Clearly, that pattern was
intended to be an extended expression.

For more info on RE's, see the following page:
http://en.wikipedia.org/wiki/Regular_expression

The "Syntax" section has some info on the differences between basic and
extended regular expressions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.