×
Namespaces

Variants
Actions
Revision as of 19:32, 31 October 2008 by extkbeditor2 (Talk | contribs)

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

Template:KBKI


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: (07 Aug 2008)
Last edited: extkbeditor2 (31 Oct 2008)

Description

Compiling certain regular expressions using the regcomp function from regex.h is slow.

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.

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

×