On Fri, May 31, 2002 at 11:00:34AM +0100, Sarah Hagstrom wrote:
> is there a way to use regular expressions when developing for palm using C &
> PalmOS SDK 4.0? i'd like to pattern-match to extract an email address from
> between brackets (<[EMAIL PROTECTED]>) and then confirm that it is formatted
> correctly (*@*.*). this is all very straight-forward if you're using
> regular expressions, but i'm finding no trace of regex in the SDK.
AFAIK there is no regular expression facility in the SDK.
I guess that for such a simple task you are far better off writing your
own validation routine (it is exceptionally simple and it will be much
faster and smaller than a more general regular expression package).
Anyway if you still need regular expressions you can easily port one
of the many freely-available implementations. Some pointers:
Ozan Yigit's very *small* implementation:
http://www.cs.yorku.ca/~oz/regex.shar
Perl Compatible Regular Expressions (PCRE):
http://www.pcre.org
GNU rx (GPL license):
http://www.gnu.org/software/rx/rx.html
(I'd go for the first one, it's the smaller and perhaps the most
easy to port).
Marco
--
========================================================================
Marco Pantaleoni [EMAIL PROTECTED]
Padova, Italy [EMAIL PROTECTED]
elastiC language developer http://www.elasticworld.org
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/