×
Namespaces

Variants
Actions

Archived:Compiling some regular expressions is slow using Open C/C++ on S60 3rd Edition devices (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Compiling certain regular expressions using the regcomp function from regex.h is slow on S60 3rd Edition.

Article Metadata
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition, FP1 and FP2
Symbian
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (07 Aug 2008)
Last edited: hamishwillee (21 Jun 2012)

How to reproduce

regex_t preg;
char* str = "192.168.1.123";
char* pattern = "([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})";
 
int rc;
size_t nmatch = 5;
regmatch_t pmatch[5];
 
//the next line will take 30-60 seconds to evaluate
if (0 != (rc = regcomp(&preg, pattern, REG_EXTENDED )))
{
printf("Regular expression compiling failed");
int c = getchar();
return false;
}

Solution

This issue will be fixed in future releases of the Open C/C++ plug-in.

This page was last modified on 21 June 2012, at 09:10.
101 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×