Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

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

From 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
Platform(s): S60 3rd Edition
S60 3rd Edition, FP1 and FP2
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Created: User:Technical writer 1 (07 Aug 2008)
Last edited: hamishwillee (21 Jun 2012)

How to reproduce

regex_t preg;
char* str = "";
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;


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 06:10.
60 page views in the last 30 days.